Refer to Avot D'Rebbi Natan ch. 9 (ver. א. In summary, he comments on
surely all those men that have seen My glory, and My signs, which I wrought in Egypt and in the wilderness, yet have put Me to proof these ten times, and have not hearkened to My voice;
Listing what the 10 trials were, Avot D'Rebbi Natan states that B'nai Israel was not punished for any of the previous 9 trials, but this 10th one, when the spies spoke lashon hara was the most severe, and for this they were punished.
We see, however, that in Numbers 12:10, when Miriam spoke lashon hara about Moses, she was afflicted with tzara'at. So, we learn that tzara'at is a common punishment for lashon hara.
Why weren't the spies afflicted with tzara'at instead of death?