First, you have to realise that in the nucleus there are two main forces that you have to consider (relevant to this question, at least): the electromagnetic force and the nuclear force. The former interests particles with an electric charge (protons, electrons), the latter holds protons and neutrons together - remember that protons would repel, so you need something that overcomes this. The nuclear force is not a fundamental force, but a remnant of the strong interaction (which binds quarks to form neutrons and protons), like the Van der Waals forces that allow chemical bonds between molecules are remnants of the electromagntic force within each atom and molecule.
Electrons do not participate in the strong force, but only in the electromagnetic interaction, so when you bombard the nucleus with electrons, they will be repelled by the protons, i.e. the charged stuff that's in the nucleus, but they won't interact with the neutrons.
Analysis of the angular distribution of the scattered electrons allows you to determine how the protons are distributed within the nucleus (i.e. where they are).
If you also wanted to know how neutrons are distributed, then you should bombard the nucleus with particles that respond to the nuclear force only, and the clear choice is other neutrons. As far as I know, electron scattering has a higher resolution and therefore provides more detailed information than neutron scattering. I suspect this is due to the fact that we understand the EM force better than the nuclear force, and also to the fact that the neutrons that you shoot in are actually composed of quarks, and each of them might be interacting with the quarks of the protons and neutrons in the nucleus.*
Long story short, neutron scattering yields worse results than electron scattering, but according to my Nuclear Physics lecturer they are compatible with one another. So you get the distribution of protons (what I am assuming is your charge distribution) from electron scattering and assume that the distribution of neutrons (what I am assuming is your matter distribution) is the same.
*This is the same reason why they call electron-positron accelerators "precision" machines: if you put in energy $E$, you know that the electron (positron) will have that energy. In proton-proton collisions, however, this energy can be subdivided among its quarks.