If your engine still has life remaining I wouldn't give up so easy. This gear is interchangable with more models than most Kubota parts. Mesicks,Colmans and several others off a parts locator for aftermarket parts to replace those discontinued by Kubota.
Also go to the Buy,Sale,Trade forum at bottom of forums list.
Complete engine swap I can't speak to but maybe someone else has tried it and will advise.