Surging RPMs is probably not the TPS.
A bad TPS will typically cause the engine to totally lack power (almost die)when accelerating. This is caused by noise
on the TPS signal that causes the PCM to send the wrong amount of fuel to the engine for the throttle opening.
Surging RPM is more likely to be caused by the following.
Vacuum leak.
Dirty Fuel injectors/ Intake manifold
/throttle plate /IAC.
lose/dirty electrical connections on EEC sensors or a bad sensor.
the first thing to do is check for any codes.
hope this helps
jeff