Why the charge of the proton does not transfer to the neutron in the nuclei? For example, when we put two objects of +10C and +20C together and then take them apart, each of them acquires a charge of +15C.
In a nucleus, the protons and neutrons are stuck together. Why is it that then neutrons has no charge and why does 1/2 the charge of proton not be transferred to neutron?
 A: The charge of the proton does not transfer to the neutron because protons are charged particles.

For example, when we put two objects of +10C and +20C together and then take them apart, each of them acquires a charge of +15C.

This occurs because 5C's net worth of electrons (which are also charged particles – though with the opposite charge to protons) move from the +10C object to the +20C object. (And it doesn't always happen; only if there's enough electrical conductivity between the objects.)
This doesn't happen in the case of protons and neutrons, because protons are the charged particles. To transfer only some of the charge, you'd have to take the proton apart… but then you wouldn't have a proton any more. (And you wouldn't be able to get a fractional charge even if you did take the proton apart. There aren't any stable particles with a charge that isn't a multiple of an electron's charge – if you count “zero”, anyway.) Besides, taking a proton apart takes a lot more energy than is available in your situation, so it won't happen. so it very rarely happens; see Xerxes's answer.
Charge transfers because of charged particles moving around – or perhaps charged particles move around because the charge does. Any way you look at it, there is a smallest charge you can have, and there's no way to split it up any further than that, unless we discover new particles.
A: A proton can exchange charge with the neutron via a process called "pion exchange". In this process, the proton with quark content $uud$ sends a positive pion $u\bar{d}$ over to the neutron $udd$. The antidown annihilates one down quark in the neutron and adds an up quark, turning the neutron into $uud$, a proton. But what happened to the proton? By sending one of its up quarks and creating a down-antidown pair, it's left with $udd$; it's now a neutron.
So even though they swap charge, you're always left with a proton and a neutron at the end of the exchange.
A: If I put a red billiard ball and a blue billiard ball in a bag, leave them for a while, and then draw one out, I will find I am holding a red ball or a blue ball. Never a purple ball.
At the level of fundamental particles, we know from experimental evidence that electric charge is a discrete quantity and behaves like the colour on the billiard balls, not like a continuous quantity such as temperature. This is shown in experiments such as Millikan's oil drop experiment. Why ? That’s just the way the world works.
A: Roughly speaking, it is because the strong nuclear force which binds quarks together is stronger than the electromagnetic force which would otherwise spread the charge more equally. But also, quarks have charges of $e/3$ or $2e/3$ so you can't get a charge of $e/2$. So then the question becomes why do quarks have these charges, and why is charge quantised in the first place? That is a long story, but a fascinating one. I don't think one can give a brief answer, except to say that it is to do with the way complex numbers behave, and it is to do with symmetry, and the way quantum physics works.
A: 
For example, when we put two objects of +10C and +20C together and then take them apart, each of them acquires a charge of +15C.

This is not always true. It is true only if the objects are conductors. If the objects are not conductors then they will each retain their original charge when separated.

Why is it that then neutrons has no charge and why does 1/2 the charge of proton not be transferred to neutron?

The nucleus is not a conductor.
A: Good question!
First, the motion of charge between macroscopic objects is defined by classical physics, specifically classical electrodynamics or classical Maxwell's equations to be specific. Nature likes to reach a state of equal potential, but in the microscopic world, things are very different.
And an important point to be made, is that your question assumes that nucleons are constantly “in contact” inside the nucleus. As explained below, nucleons are quantum mechanical objects and as such are described by wave functions. This means that their “location” is described by a probability wave. So in reality they are not actually in contact, and  their “location” takes on a more complicated description. And also because of this, nucleons do not have well defined volumes or surface areas, and so them being in contact is still not a well defined concept. And, also described below, at the quantum level, charge is discrete. It is quantized and not continuous, which seems to be what your question implies.
The behavior of protons and neutrons (nucleons) is described by the strong nuclear force which itself is described by the standard model (using the mathematical formulation of quantum field theory) and so we should not use a classical approach or description to describe such things.
Now according to the standard model, nucleons (indeed all hadrons) are composed of elementary particles called "quarks", and that nucleons are actually particle states containing these quarks.
The proton is composed of 2 "up quarks" and one "down quark" where the up quark has a charge of $+\frac{2}{3}e$. The down quark has a charge of $-\frac{1}{3}e$. This is why a proton has a charge of $+1e$ and a neutron has a charge of $0$ since it is composed of two down quarks and one up quark. It is electrically neutral as you have stated. And you cannot get these fractional charged particles on their own. They exist in bound states. See this article on quark (or color) confinement. Quarks exist naturally only in bound states with two or more or them, and trying to separate them will result in the creation of another quark.
But does the proton transfer charge to the neutron at all?
During a process called pion exchange, a proton exchanges a pion (which is composed of a quark-antiquark pair) with a neutron, which actually changes the neutron into a proton, and the original proton becomes a neutron. We can imagine this constantly happening inside the nucleus - not exactly a 50-50 sharing of charge, but interesting and relevant, nonetheless.

To summarise, the motion of charge between macroscopic objects in the classical world is not analogous to that in the microscopic quantum world, and charge is quantised and these quantised objects (quarks) form compound particles, such as protons and neutrons (there are four more other quarks - that we know of - and all the quarks can combine to form other massive, even more exotic particles, and not just protons and neutrons). These particles are all described by wave functions and quantum fields, such that their location is described by a probability distribution. They also have no well defined shape either, for them to be in “contact”. And finally, charge does not "flow" from one quantum particle to another as if it’s continuous. Rather, it is quantised. So it is not possible that they can share charge in a “half-half” fashion as you described.
But there are quantum mechanical processes where particles with quark content (and therefore charge) can be exchanged between the proton and neutron.
A: Temperature is a classical thermodynamics variable. Protons and neutrons belong to the quantum mechanical frame that became necessary to be studied when experiments showed disagreement with classical predictions . The photoelectric effect, black body radiation  and the atomic spectra could not be explained or modeled with the classical mechanics and electromagnetic models existing at the time. Quantum mechanics was necessary in order to describe the experiments and has developed in the theory of the microcosm. Beginning with Schrodinger's equation and the Bohr model the theory has developed into the standard model of particle physics as the underlying quantum mechanical level of nature.
In the quantum mechanical level charge is carried by the charged elementary particles in the table and as they are point particles, cannot be split off from them, the value is fixed and any "motion" of charge has to follow the interactions of these elementary particles.
The simple answer to your question is: because the protons and neutrons  are   composite particles made up by quarks that carry the charge, which are bound together by the strong force, the proton and the neutron independently. A spill over of the strong force makes the strong nuclear force that keeps protons and neutrons in a nucleus. It takes the very high energies of the collider experiments to change a proton to a neutron. It can happen with the weak interactions  depending on energy conservation, but the nucleus, because of the interaction, changes. See beta decay.
See this answer of mine for the complexity .
A: The proton charge and the absence of a neutron charge is static. Charge cannot flow between elementary particles as if these were pieces of metal.
Analyzing your statement "each of them acquires a charge of +15C", this would only be the case for two conducting objects of exactly the same capacitance. (I assume you check this by taking them apart again). For a statically charged object the charge distribution does not change upon contact.
.
A: There is a nice answer by @annav, I would like to add a few interesting notes.
Most of the answers display the proton and the neutron as consisting only of three quarks, in reality, it is much more complex.

https://profmattstrassler.com/articles-and-posts/largehadroncolliderfaq/whats-a-proton-anyway/
Protons and neutrons consist of a sea of quarks, antiquarks and gluons. I admit it is tempting and easy to use the valence quarks only.
You are suggesting a combination (by rearranging the quarks, the carriers of the EM force between the nucleons) of valence quarks where the total (net) EM charge of these new hadrons would have to be half of the elementary (the electron's) charge, but we happen to live in a universe where to our best knowledge (even though there is pion exchange) this cannot happen because:

*

*mathematically, you cannot create a combination of quarks, that would yield you the required half elementary charge, that just cannot happen. So you have to give up on that, but your question could still be interpreted as "can we rearrange the quarks so that the nucleons have equal EM charges?". Now if you only allow three valence quarks (up and down like in the case of the proton and neutron), knowing the EM charges of the up and down quarks, there is no combination that would yield equal EM charges for the nucleons.


Exotic hadrons are subatomic particles composed of quarks and gluons, but which - unlike "well-known" hadrons such as protons , neutrons and mesons - consist of more than three valence quarks.

https://en.wikipedia.org/wiki/Exotic_hadron


*if you allow more (or less) then three valence quarks, then theoretically you could just have all kinds of exotic mesons, or tetraquarks, pentaquarks, hexaquarks (or other such combinations), until you get equal EM charge for both nucleons. The problem is stability, because to our knowledge, this (or any other such) combination is not stable (can't create a stable nucleus, not to mention the interactions with the electron field). Quarks live in confinement, and there has to be a balance between the forces to make a hadron stable (please note the even the neutron is only stable inside the nucleus).


Again in rough lines, they are quantum mechanically bound by the potential with the additions of two fundamental forces, the strong QCD force, and the electromagnetic force. In quantum mechanics, as stated also in the comments, systems are stable when they are in the lowest energy state, and this state happens to be the proton.

Why is the proton the only stable hadron?
So the ultimate answer to your question is balance between the forces (strong, EM, and PEP), some kind of symbiosis between these forces that in our universe just happens in case of the proton and the neutron, but these do not satisfy your wish for equalizing the EM charge. Bottom line, to our knowledge, there is no combination of quarks, that would satisfy both stability (this balance between the forces) and your wish for equalizing the EM charge.
A: Because charge is quantised. You can't1 get less charge than the charge of one proton (or electron). Therefore there's no way for charge to flow from a single proton (or single electron).
In your macroscopic example it's not charge itself that is moving, but the charged particles (most likely electrons) that are moving between the bodies.
1 Ok that's not true. Protons and neutrons are made of quarks, which have either positive or negative one third or two thirds the charge of a proton, but the force binding them (the Strong force) is so strong they cannot2 be exchanged. A proton is defined by quarks that sum to a total charge of 1 and a neutron by quarks that sum to a total charge of 0.
2 Ok, that's not true either. Sometimes sea quarks can hadronize and escape, and all sorts of other complicated things that only happen in high energy physics.
A: When nuclei contain Protons and Neutrons, EXCHANGE occurs. Protons become Neutrons, and Neutrons become Protons.
The "bag model" of Gluon-Quark containment agrees with observations better than the theory of "single elementary particle" Gluons. Gluon, as a cloud surrounding the nucleus, agrees with the observation that it requires more energy to move Quarks further apart.
With a single Gluon between Quarks, the force of attraction would diminish by square of the distance, which is not observed.
According to the bag model, Quarks in nuclei would be contained COLLECTIVELY by the surrounding Gluon cloud. Electrons, or negative Pions, could roam freely within this bag, forming Neutrons as they collide with Protons. This would explain the constant EXCHANGE of charges within nuclei, and the varying mass of Gluon, that we observe. No single particle in any of it's stable states has varying mass.
To remove a Proton from the nucleus, through the "bag" of Gluon, would require energy. This energy is currently defined as the "strong force". Removing Electrons, or negative Pions, would require less energy, once defined as the "weak force".
It has been established that the weak force is not fundamental, but merely a manifestation of electromagnetic forces [the surrounding Gluon bag]. The weak force is now called the "electro-weak force".
The theoretical fundamental strong and weak forces are not necessary by the bag model, leaving gravity and electromagnetism as the only necessary fundamental forces. Occam's razor should be applied in this instance.
It is logical that Gluon is a concentration of Dark Matter, available and present in all of space when particles are created by Pair Production. Higgs Boson are hard to create, are are not observed to occupy any area of space.
