Mass of the neutron is mn=1.67493×10−27kg,
mass of the proton is mp=1.67262×10−27kg.
Proton's rest mass is less than that of a neutron's rest mass. As particle can not decay to a state of greater mass, hence the proton does not decay to neutron outside nucleus whereas the neutron can decay into a proton though β-decay.