mazda 3 2004 automatic transmission trouble

Question description

my cars RPM’s kept jumping while driving on the highway, they would jump up a few hundred RPM’s but only for a second, the car would jerk forward as expected when RPM’s go up, so in fourth gear only the RPM’s go crazy, especially going up hill or giving it gas to accelerate, when I give it a lot of gas it stays in second gear, iknow that’s expected, but I would do this to avoid the jumping RPM’s instead of slowly accelerating. when I did this the last time the RPM’s went into the redzone, about 6000 then the car came up with “AT” light and check engine light came on. also when I come to stops the RPM’s go way down to about 500-700, almost stalling out and sometimes it does stall. I checked the code it’s “shift solenoid C stuck on” (p0762) I changed the solenoid but no luck still throwing the same code. and no there was not metal shaving in the pan. all gears shift fine till it gets to 4, it’s like it goes into neutral, engine only revs up. anyone know what’s up?