I did check at the voltage at the diff. The speedometer is working does that mean the speed sensors are working.
If you measure 7.04 volts between the orange/black wire & the white/black wire supplying the clutch coil when you push the switch to 4wd, AND you can hear the selectable clutch click when it receives that voltage, then the selectable clutch is working. If the diff still does not work after clutch engagement, then its the pinion shaft spline that has stripped out. In that case you'd have to replace the clutch/pinion shaft assembly by removing the driveshaft and unbolting it from the rear of the diff housing... 3 bolts I think...
Before going any further though, unplug the selectable clutch harness from the bike. Using two jumper wires temporarily apply positive battery voltage to the orange/black wire and negative ground the white/black wire feeding the clutch coil. Then test to see if 4wd works. If so, then the 7.04 volts that the ECM is supplying to the clutch is not enough to hold the clutch coil fully engaged. Let us know how it goes...
EDIT:
I gave ya the wrong wire colors. See the attachment for TRX500FM wire colors to the clutch coil.