That means you have set a Gear Ratio Error fault (such as P0735, Gear Ratio Error in 5th, for example). Gear Ratio Error means the trans was slipping in that gear. So you likely have a weak / burned clutch (or a bad clutch piston seal) somewhere. Restarting the truck will clear the fault and give you normal shifting again.
Overheating the trans could be a factor, since you were pulling a trailer in stop-and-go traffic. Next time, shift to Neutral when you are stopped at a light. That will help reduce the amount of heat being generated in the trans.
Take it to a parts store and ask them to read the faults for you. If you have a 2010+ truck, they should find any trans faults. In 2007-2009 trucks, there is a separate ECM and TCM, and most parts store code readers will only read the ECM (which will show a P0700; this is just a flag code that means there is some other fault set in the TCM). In that case, have a dealer check the codes for you.