If either of the nuts spins freely inside of the Z lock then you have a really big problem with the printed part or a nonstandard nut dimension. The long top nut should just barely and tightly fit inside the hex hole when inserted all the way to the top of the Z lock. Then the clamp screw should prevent it from sliding down. After the spring, the lower regular sized nut should fit snugly but not tightly in the lower hex area of the Z lock. Nothing is clamping the lower nut in place. It can slide up and down inside the hex channel but it cannot spin. The threaded rod keeps both nuts the same distance from each other with the spring providing tension between them. Any looseness (backlash) in the nut/rod threads is reduced by the spring tension.
To put the assembly together start with the long nut clamped tight within the Z lock. Make sure it is inserted all to way to the stop at the top. Then screw in the threaded rod 1/2″ or so starting from the top of the Z lock. Next insert the spring and the regular nut. Push that nut with your finger to compress the spring as tightly as you can. Keep it compressed while you screw the threaded rod in further until it engages with the regular nut.
It’s kind of funny when I accidentally raise the Z axis too much and the smaller nut and spring are shot out of the bottom :).