Yes you can, but it's rather expensive in the long run.....better that you buy a new Glock with the current frame and sell the 2nd gen gun....someone out there DOES prefer the second gen frame over the 3rd.
Last I heard, Glock gets about $150 to do the switch, AND you don't get to keep your old frame, plus, the new frame will have a different serial number on it.
Used gun value.....$400 (+/-)
Cost of new frame $150
Value of old frame $150
Shipping cost $ 50
Value of gun with new frame and mismatched serial numbers.....maybe $400
So, if you add the cost for the new frame plus the $150 you don't get by selling the old frame, plus the shipping, you're putting about $350 into a gun that will still be worth about $400, and since you already paid $400+ for the gun, you now have about $750 or $800 into a gun that will still be worth $400...or less. Better to buy a new gun and sell the old one, and you aren't ruining a good 2nd gen gun that someone else will want.