Truck runs like its running out of gas when accelerating or on slighted incline on 2003 GMC Yukon XL 1500

The problem is only sometimes other times it runs perfect. After driving continuously for at least 15 minute it very rarely runs bad if at all. The transmission was changed a little over 1000 miles ago. I have change the fuel filter, fuel pump relay, fuel pump, gave it a complete tune up, used a scanner tp check for codes and there is one p1810 transmission pressure switch and I'm not sure if that has anything to do with it. What else can I check or replace?

Asked by for the 2003 GMC Yukon XL 1500