The atomic number of Nickle is 28, so its electronic configuration in ground state is,
Ni = 28 e⁻ = 1s², 2s², 2p⁶, 3s², 3p⁶, 4s², 3d⁸
So, when Nickle looses two electrons it will attain +2 charge, remaining with 26 electrons as,
Ni⁺² = 26 e⁻ = 1s², 2s², 2p⁶, 3s², 3p⁶, 3d⁸
Ni looses electrons from 4s shell instead instead of 3d shell because the 4s shell electrons are at larger distance as compared to 3d, hence, felting less nuclear charge and easily lost.