The book of Numbers recounts the years that the Israelite spent between their arrival at
Kadesh-barnea after the exodus, to the time they assembled at Mt Nebo on the Plains of Moab, poised to
conquer Canaan. The P and JE sources differ as to where the Israelites spent their 40 years. Most of
Numbers is attributed to the P source, which locates the Israelites' lengthy misery in the northern
Sinai, the wilderness of Zin, near Kadesh-barnea. That would be due south of Canaan.
The J and E
fragments in Numbers say the Israelites stayed a short time at Kadesh-barnea, and spent their 40 years
in the desert regions of Edom and Moab, east of the Dead Sea, and due east of Canaan. The long side-trip tp Bashan to attack King Og is a real oddity.
Either way, they ended up in the region of Mt Nebo, where Moses saw the promised land just before his death. Thsi region was used as the launchign pad for Joshua's conquest
The Wanderings in the Wilderness
The wanderings in the Wilderness, showing possible routes.