I think my transmission is going out.

Have you reset the PCM?
I have an 07 Ram with the 5.7 and 545RFE. The factory exhaust Y-Pipe developed a crack causing a CEL. Apparently the O2 sensor was throwing a code in which case, I had the same symptoms as you (slipping transmission and surging engine). With that said, is there any trouble codes?