The general belief from Quran is forty (40) years. Please see the Quran below:
**[5:20] وَاِذْ قَالَ مُوْسٰى لِقَوْمِهٖ يٰقَوْمِ اذْكُرُوْا نِعْمَةَ اللّٰهِ عَلَيْكُمْ اِذْ جَعَلَ فِيْكُمْ اَنْۢبِيَآءَ وَجَعَلَـكُمْ مُّلُوْكًاۖ وَّاٰتٰٮكُمْ مَّا لَمْ يُؤْتِ اَحَدًا مِّنَ الْعٰلَمِيْنَ
[5:20] And remember when Moses said to his people, ‘O my people, call to mind Allah’s favour upon you when He appointed Prophets among you and made you kings, and gave you what He gave not to any other among the peoples.
[5:21] يٰقَوْمِ ادْخُلُوْا الْاَرْضَ الْمُقَدَّسَةَ الَّتِىْ كَتَبَ اللّٰهُ لَـكُمْ وَلَا تَرْتَدُّوْا عَلٰٓى اَدْبَارِكُمْ فَتَـنْقَلِبُوْا خٰسِرِيْنَ
[5:21] ‘O my people, enter the Holy Land which Allah has ordained for you and do not turn back, for then you will turn losers.’
[5:22] قَالُوْا يٰمُوْسٰٓى اِنَّ فِيْهَا قَوْمًا جَبَّارِيْنَۖ وَاِنَّا لَنْ نَّدْخُلَهَا حَتّٰى يَخْرُجُوْا مِنْهَاۚ فَاِنْ يَّخْرُجُوْا مِنْهَا فَاِنَّا دٰخِلُوْنَ
[5:22] They said, ‘O Moses, there is in that land a haughty and powerful people, and we shall not enter it until they go forth from it. But if they go forth from it, then we will enter it.’
[5:23] قَالَ رَجُلٰنِ مِنَ الَّذِيْنَ يَخَافُوْنَ اَنْعَمَ اللّٰهُ عَلَيْهِمَا ادْخُلُوْا عَلَيْهِمُ الْبَابَۚ فَاِذَا دَخَلْتُمُوْهُ فَاِنَّكُمْ غٰلِبُوْنَ ۚ وَعَلَى اللّٰهِ فَتَوَكَّلُوْۤا اِنْ كُنْتُمْ مُّؤْمِنِيْنَ
[5:23] Thereupon two men from among those who feared their Lord, on whom Allah had conferred His favour, said, ‘Enter the gate, advancing against them; when once you have entered it, then surely you will be victorious. And put your trust in Allah, if you are believers.’
[5:24] قَالُوْا يٰمُوْسٰٓى اِنَّا لَنْ نَّدْخُلَهَاۤ اَبَدًا مَّا دَامُوْا فِيْهَا فَاذْهَبْ اَنْتَ وَرَبُّكَ فَقَاتِلَاۤ اِنَّا هٰهُنَا قٰعِدُوْنَ
[5:24] They said, ‘O Moses, we will never enter it so long as they remain in it. Therefore, go thou and thy Lord and fight, and here we sit.’
[5:25] قَالَ رَبِّ اِنِّىْ لَاۤ اَمْلِكُ اِلَّا نَفْسِىْ وَاَخِىْ فَافْرُقْ بَيْنَـنَا وَبَيْنَ الْـقَوْمِ الْفٰسِقِيْنَ
[5:25] He said, ‘My Lord, I have power over none but myself and my brother; therefore make Thou a distinction between us and the rebellious people.’
[5:26] قَالَ فَاِنَّهَا مُحَرَّمَةٌ عَلَيْهِمْ اَرْبَعِيْنَ سَنَةً ۚ يَتِيْهُوْنَ فِىْ الْاَرْضِؕ فَلَا تَاْسَ عَلَى الْقَوْمِ الْفٰسِقِيْنَ
[5:26] God said: ‘Verily, it shall be forbidden them for forty years;** in distraction shall they wander through the land. So grieve not over the rebellious people.’
But there is more to it i.e. the reason for the Israelis wandering in the desert for Forty years. The reason given (or being told) by the Catholics is different to the one given by the Quran. The reason given by the Quran is more close to truth. But that is another subject.
It is clear from the above verses that the Israelis were delayed by closing up near the Promised land. They were delayed Forty years. Then they may have taken quite a few more years capturing the land. That period of war is not exactly known.
They wasted time and wandered around in the desert of Tiah(?) for 40 years. Moses died during that time. So Moses was not with them when they entered the Promised land.