When in overdrive, the transmission control module commands the shift points based on VSS output.
These are the failure modes for shift solenoid B. Solenoid can either be open or shorted. If it is open, it will be in the OFF state all the time. If it is shorted to ground, it will be in the ON state all the time. 12V is supplied to all solenoids on one leg and the other leg is supplied a ground path by the TCM.
These are the A & B states when the TCM commands both solenoids in each gear.
Gear 1, A is ON, B is OFF
Gear 2, A is OFF, B is OFF
Gear 3, A is OFF, B is ON
Gear 4, A is ON, B is ON
When solenoid B coil is open, it will always be OFF since the ground path will be open.
Gear A B
1 ON OFF
2 OFF OFF
2 OFF OFF
1 ON OFF
As you can see, there is only first and second gear available when solenoid B is open.
Open means, the solenoid itself is bad with an open coil or the ground path from the TCM is not present due to a loose connection or a broken wire from the transmission connector to the TCM or a break in the internal wire harness inside the transmission.
Good luck finding it.