I'm not convinced (tranny) without more details. How often does this happen?
Does the tach rev up to the redline, THEN the sputtering (because it hit the rev limiter) starts? If so, I'd think tranny, but I'd drive it in D instead of OD for a while to see if it ever recurs in that gear.
Or does the sputtering and tach jumping happen at the same time (without the tach ever hitting redline)? Can you tell if the transmission has gone out of gear, or does the sputtering make the truck jerk (meaning the transmission is still being driven by the sputtering engine)?
See what I mean? These details matter.
First thing I'd suggest is checking all your major electrical connections and grounds. Battery terminals, alternator connection, engine to chassis ground (firewall), Battery ground, etc. Look for any loose or corroded connections. Might also help to idle it while you wiggle wiring, might find the culprit easily that way.
Oh yeah, Welcome to R-F.
2000 2.5 MO5D 4.10 one-wheel drive DD - gave to my older son
1990 STX 87 2.9 going in.....Junked it
2000 3.0 4WD M05D 4.10 S-cab Off-Road package with 235-75-15" tires, hotrod DD, lol