If the Haldex (the device that engages $WD when required) hasn't been serviced it is likely that it has clogged up the filter screen in it, which in turn could have caused the motor to fail, and need replacing. Does your scanning tool show live data ? You could try driving on a slippery surface (eg wet grass) and check the traction when you try and accelerate quickly. If you get slippage from the front wheels and not the rear, then the 4WD is probably not working.