I am not sure, but I learned during my undergrad that the neutron is stable in the nucleus because it transforms to proton with pions before having the time to beta decay.
HOWEVER here I learned this is nonsense of an explanation and I even got a red ticket for posting a source... and now that I think of it, it's really nonsense because- then - there would be no beta decays for any nucleus...
But in general the characteristic time for a neutron to proton transisition is supposed to be the characteristic time of nuclear interactions... you can find that "characteristic" time only by seeing how much does it take for a photon to pass through a nucleus (so how much fast is the fastest interaction within the nucleus). That's by taking:
t_{ch} \propto \frac{1 fm}{c}
where 1fm is around the radius of the nucleus...