This is the reason why Joshua circumcised them: all the people who came out of Egypt who were males, all the men of war, had died in the wilderness along the way after they left Egypt.
Surely all the men who have seen My glory and My [miraculous] signs which I performed in Egypt and in the wilderness, yet have put Me to the test these ten times and have not listened to My voice,
Nevertheless, God was not well-pleased with most of them, for they were scattered along the ground in the wilderness [because their lack of self-control led to disobedience which led to death]. [Num 14:29, 30]
Now thirty-eight years passed from the time we left Kadesh-barnea until we crossed the Zered Valley, until that entire generation of the men of war had died from within the camp, just as the Lord had sworn to them.