The N-N bond in hydrazine is purely a single bond whereas in azide ion, the N-N is shorter because it has a partial double and triple bond character which is due to resonance.
Work Step by Step
liberation of H+ ion from hydrazoic acid renders an additional pair of nonbonded electrons on the Nitrogen atom to which the hydrogen atom was originally linked. this electron pair contributes to the canonical structure of the azide ion by incresing the maximum number of covalent bonds between itself and the neighbouring atom from 2 to 3 in the series of the canonical structures of the ions. this is how bond length changes. as higher the number of bonds bertween two atoms shorter is the bond length