If you can remove the pin and replace it with a new one (needs to be straight), I've had to drill one out. The pin is normally long enough to get into the threads on barrel. I've removed a couple over the years they can be a pita. The problem you will have is the gas port will be off at an angle. You can always remove 1 thread and get the index to align on the gas port, then recut the chamber. May not be worth the expense of a new barrel.
How bad did he mess the upper up? With a pin tilted it would not fit in the slot, without excessive force.
Normally these barrel extension nuts are torqued to 80-120 ft/lbs. Some use loctite to secure them in place, so heat would be required to make it release. The torquing removes about 0.0015" of head spacing. This is normally allowed for during the machining process.