In some Yanmar made tractors use ball bearings in the front and rear of the front drive line couplers. Fairly easy to get to and service. Under the tractor, loosen the drive line cover clamps and slide them together. Put the tractor in neutral and disengage the 4WD. You should be able to examine the drive line couplings front and rear at this point and see if the drive line has engagement with both sides of the couplers. Many times, it's just needing a new set of drive balls and you are good to go. Others, the balls have stripped in the couplers and a new drive line is needed as well. Fine place to start troubleshooting the problem. If that isn't the problem, remove the drive line, engage the 4 WD and see if you have engagement at the rear coupler. ( do not start the tractor, do this by hand ) If you do, problem is in the front end and will get expensive quick. If you don't have engagement, it's a tractor split, that won't be fun either. Good luck,
Chris