The generation of the desert
(י) אַרְבָּ֘עִ֤ים שָׁנָ֨ה ׀ אָ֘ק֤וּט בְּד֗וֹר וָאֹמַ֗ר עַ֤ם תֹּעֵ֣י לֵבָ֣ב הֵ֑ם וְ֝הֵ֗ם לֹא־יָדְע֥וּ דְרָכָֽי׃ (יא) אֲשֶׁר־נִשְׁבַּ֥עְתִּי בְאַפִּ֑י אִם־יְ֝בֹא֗וּן אֶל־מְנוּחָתִֽי׃
(10) Forty years I was provoked by that generation; I thought, “They are a senseless people; they would not know My ways.” (11) Concerning them I swore in anger, “They shall never come to My resting-place!”
(ב) הָלֹ֡ךְ וְקָֽרָאתָ֩ בְאָזְנֵ֨י יְרוּשָׁלִַ֜ם לֵאמֹ֗ר כֹּ֚ה אָמַ֣ר יי זָכַ֤רְתִּי לָךְ֙ חֶ֣סֶד נְעוּרַ֔יִךְ אַהֲבַ֖ת כְּלוּלֹתָ֑יִךְ לֶכְתֵּ֤ךְ אַחֲרַי֙ בַּמִּדְבָּ֔ר בְּאֶ֖רֶץ לֹ֥א זְרוּעָֽה׃
(2) Go proclaim to Jerusalem: Thus said the LORD: I accounted to your favor The devotion of your youth, Your love as a bride— How you followed Me in the wilderness, In a land not sown.

(ג) דּוֹר הַמַּבּוּל אֵין לָהֶם חֵלֶק לָעוֹלָם הַבָּא וְאֵין עוֹמְדִין בַּדִּין... דּוֹר הַפַּלָּגָה אֵין לָהֶם חֵלֶק לָעוֹלָם הַבָּא... אַנְשֵׁי סְדוֹם אֵין לָהֶם חֵלֶק לָעוֹלָם הַבָּא...אֲבָל עוֹמְדִין בַּדִּין. רַבִּי נְחֶמְיָה אוֹמֵר, אֵלּוּ וָאֵלּוּ אֵין עוֹמְדִין בַּדִּין... דּוֹר הַמִּדְבָּר אֵין לָהֶם חֵלֶק לָעוֹלָם הַבָּא וְאֵין עוֹמְדִין בַּדִּין, שֶׁנֶּאֱמַר (שם) בַּמִּדְבָּר הַזֶּה יִתַּמּוּ וְשָׁם יָמֻתוּ, דִּבְרֵי רַבִּי עֲקִיבָא. רַבִּי אֱלִיעֶזֶר אוֹמֵר, עֲלֵיהֶם הוּא אוֹמֵר (תהלים נ) אִסְפוּ לִי חֲסִידָי כֹּרְתֵי בְרִיתִי עֲלֵי זָבַח.

(3) The generation of the Flood has no share in the World to Come, nor will it stand in judgment...The generation of Division has no share in the World to Come... The people of Sodom have no share in the World to Come... But they will stand in judgment. Rabbi Nechemiah says , neither will stand in judgment...

The generation of the wilderness has no share in the World to Come and will not stand in judgment, as it is written, (Numbers 14:35) "In this wilderness they shall be consumed, and there they shall die," according to Rabbi Akiva. Rabbi Eliezer says, about them [the verse] says, (Psalms 50:5) "Gather My saints together unto Me; Those that have made a covenant with Me by sacrifice."