Glock used to upgrade frames for $150. If they still do it, you send them the gun (frame), they'll put a current generation "lower" on it and send you the gun back. Call Glock to find out the specifics, but your serial numbers will no longer match. Glockmeister, at the moment, no longer offers this service. He's not doing any work on guns, nor is he selling them. Only selling parts right now. Hopefully this will change in the future.
Now Glocks aren't worth a lot of money used, but if you do this, your resale value will positively tank. People will look at the mismatched SN as this being a parts gun.
Glock won't tell you to beat it, but be prepared for a significant wait unless you're LE.