Sounds to me like the truck went into limp mode.
Two common problems with the 04.5 and 05 Duramax is wiring problems.
First thing to check is were the wires go over the alternator bracket. Cut the wire tie off and check if the wires are chaffing on the bracket. Mine were! Once they bare and ground to the bracket you have problems.
Second to check is the injector wiring going to injectors 2 and 7. The wires are a little too short and cause problems. GM has a longer harness available. Do to
www.dieselplace.com and search "ice pick". Some guys drive an ice pick into the wire connector for the injectors and this tightens the connections back up.
Anyways I had both these problems on my 04.5 LLY Duramax.
Good place to start.