Hmm, the z axis is the only one that doesn’t have dual motors. If they are wired wrong (matching colors together) then the steppers at each end will fight each other and not move anywhere.
Otherwise, maybe the driver on the ramps board is screwed up.
The z axis is also the only one without belts. Are the belts on the x and y axis too tight? There shouldn’t be much tension on the belts.
If you unplug the steppers from the ramps board, can you easily move the gantry around? (steppers act as generators when moved manually and can power up or overpower and damage the ramps board or stepper drivers)