P0740 (TCC Out of Range) means the Torque Converter Clutch is not engaging properly (it is slipping when it should be locked). The problem is typically in the converter (bad TCC) or in the pump (sticking valve or worn pump). Have to remove the trans to get at either one, unfortunately.
If yours is only intermittent, you may be able to just ignore it for the time being. When the P0740 sets, it will disable the TCC. When the TCC is disabled, you will generate more heat in the converter (than usual), therefore the trans will run hotter and may eventually (on a long trip) overheat. So if the CEL comes on, restart the truck (whenever it's convenient) so you'll regain TCC operation. Other than that, P0740 will not cause any issues (no limp-in, missing gears, loss of power, etc.), so if you can reset it and it then works OK, I would do that until it starts happening more frequently. Once it gets too annoying, then you'll probably need to replace the pump and converter. But it's not an emergency.
Oh, and there is one other downside to P0740: your fuel economy goes down since the TCC is not engaging. So that's one more reason to reset it each time it sets.