They take a piece of heavy wall steel tubing, inside thread it, screw in the finished barrel, then use the feed ramp of the barrel as a reference point to cut the ejection port, drill for the ejector and bolt stop pin, etc. So each barrel and receiver assembly is made as a unit
I am not sure how easy it is to get a whole new upper assembly from Ruger since the serial number is on the upper and not the frame. A new upper from them would be like having a whole different gun. In states where you need to register your firearms that could be a problem.