How difficult is it to change a distributor or could it just be the dist.cap? on 2002 Nissan Xterra

Nissan just stalled at an intersection and would not start, had to push vehicle home.

Asked by for the 2002 Nissan Xterra
1 answer
try www.alldata.com and youtube