The distance between a compression and the immediate next rarefaction of a longitudinal wave is:
Wavelength of a sound wave is defined as distance between two consecutive compressions or rarefaction. So the distance between two immediate compression and rarefaction will be λ2.