Lets stop talking to other techs unless they are GM techs. The GM techs are going to know this truck very well. i work on about 10 of these trucks week on average. However that does not mean the other ideas are good or bad, but lets look at what normally goes bad on these trucks.
Water in the fuel will not cause the lean codes p0171, p0174. It will cause the engine to mis-fire and the check engine light to flash, code p0300 to set.
A catalytic converter can cause some major issues, normally you will get a lack of power and or a p0420, p0430 to set.
One cause is also possible, you used E-85 fuel in a non flex fuse truck. This should have cleared up at your next fuel up with normal gas.
Now lets get down to the most likely cause. The intake gaskets were not checked properly. You can not test for a vacuum leak with a vacuum gauge. You need a scan tool that reads engine data such as the fuel trims. Wile looking at the fuel trims, you need to spray carb cleaner to the under side of the intake wile the truck is runing and see if the fuel trims change. This is the only test to check the gaskets with out a visual inspection.
Here is some information on this issue that GM has put out.
#PIP3232B: Cold Engine Idle Misfire Or DTCs P0171 P0174 - keywords 4.8 5.3 6.0 air cold crack hesitate idle intermittent internal intake leak lean misfire miss P0171 P0174 P0300 power rough surge vacuum - (Feb 7, 2007)
99 through 05 GEN III truck engines may experience any of the following:
- A cold rough idle that diminishes as the engine warms up.
- Possible DTCS P0171, P0174, or P0300.
- Random misfires at idle.
The intake gasket seals may be leaking around the intake ports, causing a lean condition. The intake gasket seals may leak around the bottom side of the port, making it a challenge to detect the vacuum leak. The technician may also notice lower than normal MAF readings if the intake seals are leaking.
- If leaking intake gasket seals are found, replace the intake gaskets. During the repair be sure to use the current GMSPO part number for replacement intake gaskets. The current GMSPO part number for intake gaskets will have a teal green intake gasket seal. The old version of the intake gaskets were orange in color. Use only the teal green colored gaskets for a repair.
- The intake plenum should also be checked for excessive warpage that may cause an uneven clamping pressure of the seal. If the plenum is found to be warped it will need to be replaced. Service Information states, "An intake manifold with warpage in excess of 3 mm (0.118 in) over a 200 mm (7.87 in) area should be replaced". Intake warpage is measured at the gasket sealing surfaces, and should be measured within a 200 mm (7.87 in) area. This measurement is across only two of the intake runner port openings. Measurements taken across the entire distance of all four intake runner ports will lead to unnecessary manifold replacements.