Rashi comments that the connection between the conclusion of Baha'alotcha and the beginning of Shlach is the common sin of Lashon Hara. Rashi explains that although the Meraglim saw that Miriam was punished for speaking Lashon Hara, they failed to learn from her mistake and spoke Lashon Hara about Eretz Yisrael.
Rav Soloveitchik adds that there is more than Lashon Hara that is similar between Miriam's slander and the Meraglim's slander. Both failed to appreciate the special spiritual qualities of Moshe and of Eretz Yisrael. Miriam, in her conversation with Aharon, failed to appreciate the unique relationship Moshe had with Hashem. Similarly, the Meraglim failed to appreciate the unique spiritual qualities of Eretz Yisrael.
Many Jews when visiting Israel continue this bad habit. We complain about all sorts of mundane items (food, clothing, etc.). Instead of focusing on the shortcomings of life in Eretz Yisrael, we must focus our attention on the great holiness of Eretz Yisrael. In our times in particular, too many Jews fail to appreciate Eretz Yisrael despite the many miracles performed for us by Hashem in the past fifty years. We must dedicate ourselves to thanking Hashem for giving Am Yisrael control over Israel and appreciate its holiness.