All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Some pagan Arabs used to come to the Prophet and asked him: "When is the Hour?'' So he, alayhi wa sallam, used to look to the youngest amongst them and say: ''If this young boy lives he may not grow old enough before the Last Hour would come to you." Hishaam one of the narrators said: ''He meant their death." [Al-Bukhari] Moreover, a man asked the Prophet "When is the Hour?" A young boy from the Ansar whose name was Muhammad was with them. So the Prophet said: ''If this boy lives long he will not grow very old before the Last Hour would come." [Muslim]
Furthermore, Imaam Muslim reported that Anas narrated: "A young servant of Al-Mugheerah Ibn Shu'ba happened to pass by the Prophet and he was of my age". Thereupon the Prophet said: "If he lives long he would not grow very old before the Last Hour would come."
What is meant by the coming of the Hour in the above narrations is the coming of the Hour of the companions who were the audience, which means their death, as in the narration reported by 'Aa'ishah: "He will not grow old before your Hour would come to you.'' Besides, the narrator interpreted this to mean their death, because when one dies, his Last Hour has come or start, as the Prophet said: "The grave is the first stage among those of the Hereafter." [Ahmad]
Therefore, the coming of the Hour in the above narrations does not mean the end of the world and the Hour of all the people.
When the Prophet was asked about the Last Day by Jibreel (the angel Gabriel), he replied that the person who was asked (i.e. himself) did not know more than the one who asked the question (i.e. Jibreel). [Al-Bukhari and Muslim]
To conclude, what is meant by the coming of the Hour before the boy reached the old age was their death.
Allaah Knows best.