Circuit/System Verification
WARNING: This page is about a different car, the 2008 GMC Sierra, 2008 GMC Cab & Chassis Sierra, 2008 Chevrolet Silverado, and 2008 Chevrolet Cab & Chassis Silverado. However, it is still accessible from the selected car via links, so may be relevant.
If there are any other engine or transmission related DTCs set, diagnose those DTCs first. With a scan tool observe the Park/Neutral switch parameter in the engine controls data list and move the gear shift lever from Park, to Reverse and through all the ranges and observe the parameter as you move the shift lever. The parameter should display Park/Neutral when in Park or Neutral and In-Gear when in Reverse, Drive or Drive Low. It is especially important to closely observe the Park and Neutral to Drive transitional positions while moving the shift lever and observing for possible misalignment or slack in the shifter mechanism.