John
Neutrons are extremely close to protons in mass, however, it is a difference that is still noteworthy.
I believe it is attributed to the fact that protons and neutrons have different constituent particles.
Proton = uud
Neutron = udd
Protons are composed of two up quarks and one down quark.
An up quark has a charge of +2/3 and a down quark has a charge of -1/3
+2/3 + 2/3 - 1/3 = +3/3 = +1
Neutrons are composed of one up quark and two down quarks.
+2/3 - 1/3 - 1/3 = 0
So you can probably reason that down quarks are more massive than up quarks.
If this interests you, you should search information on quarks. The field that deals with them and their interactions is very interesting.
Anonymous
Protons and neutrons do not have the same mass. Their masses are quite close, but they are noticeably different. For some purposes it is okay to equate the neutron and proton mass, but it's just an approximation. Also, neutrons decay into a proton, an electron and an antineutrino. For that to happen the neutron must be heavier than the proton.