Hello and welcome to JustAnswer!
You found 1, 2, 5, and 5. These are in the engine controller, not the trans controller. 12 means the battery has been disconnected at some point, 55 means end of test.
Your trans is fully electrically controlled by a module. When the transmission controller sees a problem it thinks can cause potential damage to the trans it will shut off the relay that powers the shift solenoids, and it locks you in second gear. This is called limp-in.
When the trans goes into limp-in it will set fault codes in the TCM. The first thing you need to do for this is have the codes read that are stored in the TCM. They will point in the right direction for diagnosis. This will need to be done using a capable scan tool through the data link connector under the dash.
There are many possible causes for limp-in. The most common and cheapest cause would be either the input or output speed sensors that are screwed into the front of the trans. These run about $20, are easy to change, and will be in stock at any parts store or dealer. If the speedometer always works ok when the trans won't shift you can rule out the output speed sensor, it's signal is also used for the speedometer.
The next most common cause would be a failed solenoid or clutch pressure switch. These are all inside the solenoid pack mounted to the front of the trans. If any of the solenoids or pressure switches are bad it requires solenoid pack replacement.
Other possible causes include internal trans problems, wiring from the trans to the TCM, or even the TCM itself. The stored fault codes will tell you where to start.