Can the electrophile attack at the position of the NH2 group in nitration of aniline?
Maybe just after some time, the $\ce{-NH2}$ group will become $\ce{−NH3+}$ (acidic medium) and $\ce{NH3}$ would depart as a leaving group?


No! You are confusing the leaving group oxonium ion with the ammonium ion. Simply put it, $\ce{R-NH2}$ does not leave as $\ce{R+}$ and $\ce{NH3}$, as you might expect from the hydroxyl group leaving mechanism.

But that does not mean there is no other way to make an $\ce{-NH2}$ group (which is a very bad leaving group) leave. You can instead make it leave as dinitrogen gas!

The way this works is by the reaction of $\ce{R-NH2}$ with $\ce{HNO2}$. If $\ce{R}$ is an:


aromatic group: a diazonium ion, $\ce{R-N2+}$, will be formed (stable at ice cold temperature). Further reactions such as Balz-Schiemann, Gattermann, Sandmeyer, etc. may be employed to replace the $\ce{-N2+}$ with another group, and make it leave as dinitrogen gas.
alkyl group: $\ce{R-N2+}$ will be formed but it will, being highly unstable (given that it does not enjoy the resonance stabilization of an aromatic ring), instantly decompose to release dinitrogen gas and form a classical carbocation $\ce{R+}$. This carbocation may rearrange, if necessary, and then receive an attack by a nucleophile.


This is how you make the bad leaving group, $\ce{-NH2}$, leave any aromatic ring or an alkyl group.