Every battery is interchangeable, except never use a gel cell (AGM's are fine) in place of a automotive,UTV or mower battery as they need to be removed and charge at low charge rate, and are made for Very high discharge applications.
Most batteries come in Group sizes, but mainly you need to make sure you match t or beat the cranking amps,
You should be able to take that battery to any auto parts store and they should have one that will work. Also you'll save money (about $15) buy not paying a core charge on the old battery. (they'll recycle your old battery).
I would remove the shift linkage, and put in gear by hand/manually, if possible, and drive it... if it still jumps out of gear, i would suspect a trans issue. If not, most likely the shift linkage needs adjusted to compensate for wear, as it's not fully engaging F or R