What engine does your truck have in it ?
Ok,this is a vehicle indicator problem with the vehicles powertrain control system.The first thing to do is have your vehicle scanned with a class 2 scan tool to check for failure codes.This can be caused by an engine input sensor failing,rich or lean condition,accelerator pedal position sensor failure are a few among the list.A scan will tell you for sure.I have found some GM info that may help.
#07-06-04-019: Intermittent MIL/SES, DTC P2138 with Reduced Engine Power (Repair Instrument Panel (IP) to Body Harness Connector) - (Jun 21, 2007)
Some customers may comment on an intermittent MIL/SES light Illuminated with a message center or an indicator that displays Reduced Engine Power. DTC P2138 - Accelerator Pedal Position (APP) Sensor 1-2 Correlation may be set. The voltage difference between APP sensor 1 and APP sensor 2 exceeds a predetermined value for more than 2 seconds. Refer to DTC P2138 in SI for further diagnostics.
On some vehicles, the IP to body harness connector, which carries the APP signal to the ECM/PCM, is located in the left hand kick panel area and if the kick panel is not sealed properly, water enters and causes a short in the APP circuits setting a P2138 code.
Important: Do Not replace the accelerator pedal assembly.
Locate the IP to body harness connector, which may be located in and around the left hand kick panel area. Check to see if there is a water leak into the area and repair as necessary.