For the children of Israel walked forty years in the wilderness, until all the nation, even the men of war who came forth out of Egypt, were consumed, because they didn't listen to the voice of Yahweh: to whom Yahweh swore that he wouldn't let them see the land which Yahweh swore to their fathers that he would give us, a land flowing with milk and honey.
God had guaranteed Joshua’s success only as he kept the Mosaic Law (Joshua 1:7). It was necessary therefore that all the males who had been born in the wilderness and had not undergone circumcision should do so. Circumcision brought the individual male under the blessings of the Abrahamic Covenant (Genesis 17). It was also a prerequisite for partaking in the Passover that God required of all Israelites yearly (Exodus 12). Like the stones just set up, circumcision was also a memorial.