Hello and welcome to JustAnswer!
Don't give up yet! The gear ratio codes, the not shifting, and the speedometer not working all go together. When the trans controller sees a problem it thinks could cause potential damage to the trans it will shut off the relay that powers the solenoid pack and lock you in second gear.
The output speed sensor is mounted on the front of the trans, on the deriver's side. This sensor's input (along with the input speed sensor) is used for shifting control, but it's signal is also converted to vehicle speed and sent out to the other modules, one of them being the instrument cluster so you have a speedometer. If the output speed sensor goes down you will be locked in second gear and won't have a speedometer.
You could have a wiring problem or a bad speed sensor. The sensor itself is very likely. Look over the wiring and if it's ok I would go ahead and replace the sensor. It runs about $20 and will be in stock at any parts store or dealer.
It's not a big deal! Things can happen to anybody at any time, trust me! I could drum up a few stories of my own (but I try to block them from my memory!). Look the wiring over, stick an output speed sensor in it and I think you'll be shfiting again.