In the case of nitration of aniline intermediate stability determines products.The following figure depicts possible electrophillic attack on aniline. Structures 4 and 12 are additional stable resonance structures obtained by attack of nitronium electrophile at ortho and para positions.
Structure 8 is relatively unstable due to negative effect of Nitrogen.

In nitration of aniline in strong acid (HNO3, H2SO4) aniline changes to anillium ion .Anillium withdraws electron density.Its effect is felt maximum at ortho followed by meta and then para position. Consequently very little of ortho nitrated product is formed.
Since electron withdrawing inductive effects are minimum at para position ,maximun nitration occurs here.


Summarizing ,
Even though there exists a possibility of hydrogen bonding in ortho nitro aniline ,strong deactivating influence of $\ce{NH3^+}$ on benzene ensures least electrondensity at ortho position in aniline leading to only 2% of ortho nitro aniline.
Such electronwithdrawing tendencies of $\ce{NH3^+}$ are minimum at para position in aniline therefore 51% of para nitro aniline is formed.