Look carefully at the end of the moderator about an inch from the barrel. If there’s a line with three iirc punch marks. The tube has come adrift from the threaded part. The punch marks are what stop it turning.
I have two options for you.
First get a punch a fairly sharp one and put the mod on a wooden block and make the dints a bit bigger.
Or you need to get some grips on the short section nearest the muzzle.
You were dead right it had not been pinned in place hence the rotating. I will get it punched in place to secure it properly. Thanks for your help.