How come neutrons in a nucleus don't decay?
Spontaneous processes such as neutron decay require that the final state is lower in energy than the initial state. In (stable) nuclei, this is not the case, because the energy you gain from the neutron decay is lower than the energy it costs you to have an additional proton in the core.
For neutron decay in the nuclei to be energetically favorable, the energy gained by the decay must be larger than the energy cost of adding that proton. This generally happens in neutron-rich isotopes:
An example is the $\beta^-$-decay of Cesium: $$\phantom{Cs}^{137}_{55} \mathrm{Cs} \rightarrow \vphantom{Ba}^{137}_{56}\mathrm{Ba} + e^- + \bar{\nu}_e$$
For a first impression of the energies involved, you can consult the semi-empirical Bethe-Weizsäcker formula which lets you plug in the number of protons and neutrons and tells you the binding energy of the nucleus. By comparing the energies of two nuclei related via the $\beta^-$-decay you can tell whether or not this process should be possible.
The Pauli Exclusion Principle states that no two identical fermions (neutrons and protons are fermions - they have half-integer spins and obey Fermi-Dirac statistics) can occupy the same quantum state at the same time. If the neutron were to $\beta$-decay as: \begin{equation} n \longrightarrow p + e^- + \bar{\nu_e} \end{equation} then this freshly minted proton will try to occupy the quantum state with the lowest possible energy. However, since there are already loads of protons in the nucleus, this 'new' proton can't do that, and so will be forced to occupy a state with higher energy. In order to get to that state, it must absorb some energy. This is why neutrons don't usually $\beta$-decay inside the nucleus. Do remember that $\beta$-decay of neutrons inside the nucleus isn't unheard of - just uncommon.