I got this code regularly here recently when I found out my vacuum line was cracked and splitting at the ends, a simple superglue and electrical tape job kept the vacuum line serviceable for a while, but ultimately I had to replace it. Once I did, the P0171 code went bye bye! So yea, check that first, the hose is up under the intake manifold resonator. (the big, hollow, black piece of plastic with the VORTEC 2800/3500 on top of the engine) If you feel up under there on the back of the engine under the intake resonator and find it covered in a oily, watery residue, then yea, your vacuum hose is probably cracked and splitting, causing the leak. Pull that thing apart and repair it till you can get a replacement!
Disassembly of the air intake manifold is not difficult, so if you're not afraid to turn a socket wrench or a screwdriver you can get it apart, just remember how you got it apart and keep up with your screws! Hope this helps, good luck!