When there is more than one amino group in a molecule, which group is more likely to react when forming an imine?
Imine formation essentially involves an nucleophilic amine and an electrophilic carbonyl group. To decide which is the nucleophilic $\ce {N}$ atom which performs the nucleophilic attack on the electron-deficient $\ce {C}$, we would have to first consider each $\ce {N}$ atoms nucleophilicity, which we can interpret here to be the ability of the $\ce {N}$ atom to donate its lone pair of electrons. 

For 1 and 2, the lone pair is delocalised into the carbonyl group and they can be seen as behaving as amides. This delocalisation significantly reduces their nucleophilicity. As discussed by Ron here, the delocalisation is so strong that restricted rotation about the $\ce {C-N}$ bond is observed. For 3, there is no such delocalisation present, thus the lone pair of the $\ce {N}$ is readily donated to electrophiles, making it the likely nucleophilic atom for the imine formation.

Another possible effect that raises the nucleophilicity of that $\ce {N}$ atom is the alpha effect, also discussed here. The following diagram (p. 513) from Clayden, Warren, &amp; Greeves (2012) illustrates the molecular orbital theory basis of the effect. Although it is used to illustrate the effect for peroxide, the same concept can be extended to our case of nitrogen atoms. The adjacent $\ce {N}$ atom with the lone pair can increase the nucleophilicity of the $\ce {N}$ atom. However, the alpha effect may be less prominent for our case since the lone pair of the adjacent $\ce {N}$ is also being strongly delocalised into the carbonyl group. Nonetheless, it is an interesting consideration, further justifying why 3 should be most nucleophilic among the three. 



Reference

Clayden, J., Greeves, N., &amp; Warren, S. (2012). Organic Chemistry (2nd ed.). New York : Oxford University Press Inc.