Different cable lengths were used on MR2 S54 boxes. The pic shows the part numbers.
Some of the cable length variation was due to Toyota fitting an updated shift lever where the cable connects to the transmission to stop cables breaking, and
the new shift lever needs a longer cable (about 10 mm).
With the updated lever, the cable bush sits about 10 mm further back at the gearbox end so that a slightly longer cable is needed if the gear-stick is to sit vertical in neutral.
This may be a long shot but .......................................
if you have just fitted an older box with an early shift lever that may be the problem, because it needs a shorter cable.
And if the old box you pulled out has the updated lever, simply swap them over.
In the other pic, the updated shift lever is shown on the right
I hope this may help.