Check a map, see how many countries border Russia are in NATO. Norway joined 1949, Poland 1998. West Germany 1955, Estonia, Latvia, Lithuania in 2004.
It's nothing to do with NATO, Ukraine hadn't even talked about NATO until after Russian aggression. They wanted EU membership.