hdhondt is right. A neutron doesn't need to "know" that another state isn't lower in energy to stay in the state is it at. It stays in the state of lowest energy because it is the state of lowest energy (just like a ball at the bottom of a pit).
Furthering hdhondt's ball example: the ball in the pit moves to the bottom (where the gravitational potential energy is the lowest) and, assuming all its kinetic energy dissipates, will stay there. It stays there not because it explored all its possible energy states (all the locations in the pit) and therefore knows which one has the lowest energy but because (again, assuming the kinetic energy dissipates) gravity will cause it to come to rest at the place of lowest potential. I give this as an intuitive picture we've all had experience with. In a nucleus, there are different forces at work but the picture is basically the same. It's not that the neutron knows its in the lowest energy state, but that eventually the neutron will end up in the lowest energy state, just like the ball in the bottom of the pit.