DIAGNOSIS Probably not a bad battery. This is usually a thermal cutoff. The battery or the mower's motor controller is overheating and shutting down to protect itself.
FIX Let everything cool down completely. For the battery, take it off the mower and leave it in a shaded, room-temperature spot for 45-60 minutes. The issue is often caused by mowing tall, thick, or wet grass which overloads the motor. Next time, cut the grass higher on your first pass, and go slower in heavy patches to reduce the strain.
IF THAT DIDN'T WORK Try the battery in a different Toro 60V tool if you have one, like a trimmer. If it also dies quickly there, then it might be a faulty battery cell. Toro has a 3-year warranty on batteries, so contact them if it's within that period.
HEADS UP Using a lower-capacity battery (like the 2.0Ah) in this mower will give you very short run times, especially in tough grass. For this 22-inch Recycler, you really want the 6.0Ah or 7.5Ah battery for decent runtime.