Is there a way to transform location for only the z-axis?

The problem is the pivot point. The point from which the object translates, rotates, or scales. You need to go into your 3D editor software, move the pivot point to the bottom-center (or bottom corner) of your mesh, and reimport your mesh. Now, when you scale or rotate, it’ll be done from that point. Specifically, for scaling along the Z axis, your character will stay on the ground.