I agree, I definitely need to fix this problem before I go about making any accessory repairs
I'd stop driving that truck till you get this figured out - you clog up those cats and OEM O2 sensor cost will be the last of your concerns.
As has been pointed out, we cannot use the cheap O2 Sensors. You need to get those replaced. The OE high cost have a warranty so if you have an issue within 12 mos or so, they'll replace them w/o issue. The reason your [rear] codes went away after you replaced the rear is because all that black stuff is clogging up your cats right now and it's not really getting to them, but rest assured, in your current condition, they'll start throwing again as soon as that carbon starts to fully work its way through and coat them - i.e. without fixing the underlying issue, it'll come back.
I think these two are your culprits, but I can be wrong...
P0130 - O2 Specific though it can be caused by Faulty Fuel injectors or inappropriate fuel pressure
P0150 - Fuel Rail/System Pressure is too high.
That said, I would perform a fuel pressure test. You need to hook up a fuel PSI tester to your line when it's cold and check your pressure (write it down). Then, you need to do the same with the key in the on position (fuel pump comes on) and then again after you turn the truck over and start it up. Report back your numbers, unless you know how to diagnose the injectors/filter/regulator or pump from there.
P0171 & P0174 together usually indicate you have a vacuum leak in the intake system. Since you just got the HG done, it's possible there was a step missed or something didn't get tightened down to spec or maybe a gasket is pinched or something? It's also possible that due to your fuel issue above, this could be a bi-product, since all these codes are coming back as fuel/air. Personally, I'd fix the above first
and then perform the following if these are still present...
Begin by looking for a vacuum leak. With the engine running, spray some carb-cleaner around your intake plenum and heads, etc. to see if you get a reaction from your motor (you'll know it if/when it happens). If you hear your motor bog a little then you will need to focus in that area to find the leak. If that comes back clean, you need to perform a smoke test on your intake manifold. You have 3 options here - (a) Have a shop run the test for you, (b) you can rent a tester and perform the test yourself, (c) buy a cigar and get some plastic/rubber-bands so you cap off your intake and perform the test this way (I did c on mine).
Just my .02... hope it helps some