And the LORD’s anger was kindled against Israel, and he made them wander in the wilderness forty years, until all the generation, that had done evil in the sight of the LORD, was consumed.
God became very angry with Israel and made them wander in the desert for forty years. This happened until the entire bad generation, who did wrong in God's eyes, died off.