if the nut moves inside the frame in any way, there is no way it's not going to spin when you try to tighten it.
If you have the right bolt and the welded nut is gone from inside the frame rail you have to take it to a mechanic and have them open a spot in the frame rail and reweld it in place for you then close up the frame rail again.