It is 30 bolt hole pattern final drive motor, $4100 is a bargain and if it 15 holes for sprocket, you might be overpaying it.
I would advise you to inspect the gears. If there is no significant wear, I would keep operating it untill something else breaks and then install a new one.
And you...
Whatever is broken on the final drive, it is always advised to get a aftermarket replacement. You will never know exactly what is broken and after a couple of month something else will break again.
Get the prices for parts from JCB and compare them with brand new replacement Jcb | Hydraulic America