Are you sure its not your torque converter. If the gears are all there and your speedo is working and it is changing up and down at the correct RPM but jerking I would think that the torque converter needs replacement as it is not putting through enough pressure.. bit like if you had too little fluid in your auto-transmission. I'm not an expert at this but I have a similar problem and took the car to a specialist. As soon as he put it in D or R the sudden jerk forward or back he immediately said torque converter. I'm also in a learning curve and could be wrong but what happens if a speed sensor goes does S come up on the dash indicating an electrical problem