The nut is supposed to thread off the barrel on the chamber end of the barrel. If you threaded yours off towards the muzzle, that`s where you went wrong.

For the new install,put a dab of anti seize on the barrel threads, thread the nut on (from the chamber end to the muzzle end), then thread the barrel on the action to set the head space. Once the hs is set, tighten the nut. Some guys just do this hand tight with the nut wrench and some give the wrench a light tap with a dead blow hammer.