I had the same trouble with the transmission going in and out of overdrive. You'll find a ton of posts on this subject. Some call it,,, "hunting".
I ordered the DTT noise filter and also made sure that my battery terminals were cleaned. This worked for a few months. Then,, every so often, I'd feel that lousy RPM jump, in and out of OD!
Some of our trucks produce excessive electrical noise which causes this problem. (Another screw up by those rocket scientists who designed these trucks) One of our members came up with the idea of by-passing the circuit (two wires) between the ECM and the APS (I think those are correct). This removes those wires from the main harness where they evidently pick up the electric noise from the other circuits.
I did this procedure and haven't had any problems for aproximately the last 2,000 miles. I don't have the specifics with me at present. I'm currently at work. I'll get more information for you tomorrow regarding the members name. He has the color coding for the specific years.