I would exhaust all of the options the abs control unit is one of the more expensive bits on an Xterra of this vintage. Have you plugged a code reader into it?
Look up Ry the car guy on youtube. His Xterra videos are fantastic.
https://youtube.com/c/Rythecarguy
I have owned my Xterra for 13 years and its been a great vehicle.