When the neutron was first proposed it was theorized to be composed of a proton and an electron in close orbit. However, this has been rejected because
(1) The neutron, proton, and electron all have spin 1/2. If the neutron were composed of a proton and electron it would have to have a spin of 1 or 0.
(2) The neutron's magnetic moment is two thousand times less than the magnetic moment of the electron. If the neutron contained an electron it would have a magnetic moment of the same order of magnitude as the electron.
(3) The kinetic energy of electrons released in beta decay is far less than they would be if they were actually bound in stable configurations inside the nucleus.