Neutrons (and protons) being spin 1/2 fermions, must fit antisymmetric wavefunctions. This "wavefunction" doesn't always involve waves, though. For nucleons - the generic term for neutron or proton - this wavefunction for the pair is a produce of (1) a spatial part, (2) a spin part, and (3) an isospin part.
The isospin part is a clever way to describe charge possibilities of otherwise identical particles. We regard neutrons and protons as being in a sense identical. Just as a spin 1/2 particle can be "up" or "down" along some chosen axis, so is an isospin 1/2 particle can be "up" or "down" along an abstract mathematical axis - it's exactly the same SU(2) math as spin - but it plays out in physical reality as charge. For nucleons it's not +1/2 and -1/2 charge but with an offset, so we have +1 (proton) and 0 (neutron). This idea is from Heisenberg in 1932.
Now, how can the overall wavefunction of a pair of particles be antisymmetric? There are three factors - right away we can imagine three possibilites: any one factor being antisymmetric with the other two symmetric. We could also have all three antisymmetric at the same time.
An antisymmetric spatial wavefunction would have a node, like an atomic p orbital, like the electric potential around a dipole antenna. This is a higher energy state than a simple spherical blog, a Gaussian. Given the range of internuclear forces, this nodal antisymmetric wavefunction has more energy than if the two nucleons just stayed apart. This is a matter of radial or angular kinetic energy has to be either "zero" or some quantized value that exceeds "escape velocity" So forget that part of the system wavefunction being antisymmetric.
BTW, we don't have separate spatial wavefunctions for the two nucleons - whatever one does, the partner does the exact opposite, like a two-body celestial mechanics problem. They orbit a common barycenter.
The spin part could be antisymmetric. This is a bit tricky. If particle #1 is up and #2 is down, we can write "UD". There is also "DU". We form the spin part of the wavefunction for the pair as UD-DU. We could instead choose UD+DU but note this is symmetric. So are UU and DD. Just how UD-DU differs from UD+DU may mystify beginners in quantum mechanics, but it's important, and it's how physical matter works whether we humans like it or not. (You might also see where the 'u' and 'd' quarks got their names. The quark idea came along years after isospin.)
Neither D nor U is really a wave or a function; they're at most just rows and columns in matrices if you must represent them in familiar math. Otherwise quantum physicists just deal with these symbolically. Still the jargon is "wavefunction" - we silly humans and our primitive scientific language!
The same math applies for isospin. But the physics differs. We've concluded that the spatial part of the system wavefunction must be symmetric, so it's up to either the spin part or the isospin part to be antisymmetric. But not both! If spins are symmetric - they're parallel. This is experimentally the case - the Deuteron (obtain by distilling "heavy water" from water) - so we deduce that the isospin part is antisymmetric. That is, we must have one isospin "up" and one isospin "down" - neutron and a proton, not two neutrons or two protons.
Just why must the spins of the two nucleons be parallel? The strong force holding them together - the exchange of pions, kaons and other mesons - works better in that case. To explain that takes deeper analysis than I can go into here. When the spins are antiparallel, there's not enough force to keep the nucleons together.
This would be the case though, were to try pushing two neutrons together. They'd be both isospin "up" therefore symmetric isospin part of the wavefunction, therefore requiring an antisymmetric spin part, which leads to the pions and their buddies not getting as good a grip on the neutrons, which drift off going their separate ways.