904 No 2 or D

Sounds like a stuck governor.
Since it did go into second, we know the front band is not the problem and niether is the forward clutches.
Inconsistent shifting is a clue to sticking valves in the valvebody or governor.