"Who were they who heard and rebelled? Were they not all those Moses led out of Egypt?” Hebrews 3:16
Even though only 2 out of 12 had a certain view, it does not make that view wrong. Faith enables us to trust God to bring victory.
"They gave Moses this account: “We went into the land to which you sent us, and it does flow with milk and honey!Here is its fruit. But the people who live there are powerful, and the cities are fortified and very large. We even saw descendants of Anak there" Numbers 13:27-28
Yet Caleb saw the same situation in a different light.
"Then Caleb silenced the people before Moses and said, “We should go up and take possession of the land, for we can certainly do it" Numbers 13:30
Israelites disagreed and did not believe, the consequence, was no one above 20 being able to enter the promised land besides Caleb and Joshua.
"But because my servant Caleb has a different spirit and follows me wholeheartedly, I will bring him into the land he went to, and his descendants will inherit it" Numbers 14:24
"Then Moses summoned Joshua and said to him in the presence of all Israel, “Be strong and courageous, for you must go with this people into the land that the Lord swore to their ancestors to give them, and you must divide it among them as their inheritance" Deuteronomy 31:7
Finally,
"On the seventh day, they got up at daybreak and marched around the city seven times in the same manner, except that on that day they circled the city seven times. The seventh time around, when the priests sounded the trumpet blast, Joshua commanded the army, “Shout! For the Lord has given you the city!" Joshua 6:15-16