you should have asked the last owner if he had it changed on regular basis
gear being stuck or taking above 2k rpms for shift is usually the oil level low or the particular valve body solenoid getting stuck because of clutch /bearing/dirt particles getting in the way or even electricity problem in the wiring or the solenoide itself but that usually sets out a code in the latter cases
get the oil level checked if less use approved atf oil and if you have a d light blinking or check engine light on then also get it scanned...
proper inspection will shed some light on whats wrong... @Barry what do you say...?