In [Ni (CN)4]2- Ni exist in Ni2+ state, i.e.
Ni2+ → [Ar] 3d and CN– is a strong field ligand, so it causes pairing

In [Ni(CO)4], Ni exist in Ni(o) state and electrons of 4s gets paired up in 3d orbital due to strong field ligand-CO.

As discussed above, geometry is different in both the cases but none of these have impaired electrons, hence both are diamagnetic.