So the length of a wave is the distance between two compressed regions as shown in this representation of a longitudinal wave:
But how do you know exactly where the two points are? Is there a point where the particles are most compressed? It's hard for me to explain my confusion with this. Are you measuring the distance between only two particles or are you taking the average of an area of many compressed particles and saying "somewhere in here is one point" and then doing the same for the other compressed region? Hope this question makes sense.