Same thing happened to me when I had the same truck..
The problem was in the fuel filter. On the bottom of the fuel filter is an elec. sensor for water. This thing s'posedly got stuck and it sends the engine into reduced power mode. It happened with me in Quebec where all our fellow country men speak mostly French only,..that's another story...but they have good GMC mechanics that know their stuff. He changed the entire filter and we were away. They seemed to know exactly what to look for.
Hope this will help you. Yes,...always carry a spare filter, and you get at the thing from inside the right wheel well on the outside.
The West Coast Folks...just back from the Black Hills
Vancouver to Newfoundland and back, Vancouver to the Black Hills,return, Vancouver to Fairbanks return. (we like the long hauls)
Wildcat 313RL (lifted),
2015 Dodge diesel 3500 (lifted)