Firstly, when a black hole forms, it no longer contains neutrons or any other kind of material. Everything is destroyed inside an infinitely small singularity in the centre of the black hole.
But you're correct about the relative masses of electrons, protons and neutrons. Electron mass is much much smaller than mass of protons or neutrons. Neutrons are the heaviest of all three particles.
Neutron stars are actually composed not just of neutrons, but also atomic nuclei (protons and neutrons) and some electrons. But the pressure in them is so high that the electrons are pushed into the nuclei and combine with the protons to form neutrons. The more massive neutrons can be packed together more tightly than the electrons or protons could.