If it's a tractor-style riding mower, those are dirt cheap now that everybody's buying zero-turns. Keep it as a parts mower and buy another. If it's a zero-turn, you can sometimes find broken ones cheap, and that's a consideration if the frame's weak.
If buying another isn't an option and the hydrostatic drive wasn't disengaged, you're looking at a hydrostatic drive rebuild. They used to be inexpensive to rebuild, but last time I went to buy the kit to rebuild the K46 on my JD L130 the prices had jumped up to the same price as a new drive. The drives themselves are fairly easy to rebuild.
If you can improve the airflow to your hydrostatic drive, do it. The heat is usually what kills them.