Update:
The P0500 and P0501 fault codes were caused by the right front wheel speed sensor. I replaced it, and the car shifted fine, but only for the first few minutes of operation. Once the engine temperature gauge reached a little over 1/4 of the way up while driving, the check engine light came on with code P0715 (Intake Speed Sensor/Turbine Circuit Malfunction). Now, the problem is that it gets stuck in third gear. When braking, it doesn't downshift to first, and when accelerating again, it feels very sluggish. The next day, when it starts for the first time, it works fine again, but only for the first few minutes.
Any opinions or help would be greatly appreciated.
Thank you.