Yeah, probably the motor or it's wiring acting up.
The service 4wd message is one that will display when the encoder motor fails to go to the expected position.
The controller will give it several tries, but if it doesn't rotate into the prescribed position, it throws that error.
If your fork were broken, your system would likely appear to be in gear, when in reality it isn't.
For example, you can unbolt the encoder motor completely but leave it plugged in, the system will still act like normal. You just wont actually be shifting your transfer case.
The encoder motor simply reports back what position it THINKS it's in, then your dash displays that.
On my encoder motor, years of road salt and corrosion caused the motor shaft to seize. I had to replace it because it wouldn't shift.
If there is too much stress on the drivetrain, like you are climbing a hill or accelerating, the encoder motor may not be able to engage another gear.
It is best to be coasting in a straight line at a low speed to give the gears the best chance to mesh.
Perhaps your encoder motor is not able to generate enough force to bump you into gear every time anymore.