This has been a controversial verse in the bible where scholars claim that Jesus was wrong about his second coming. In fact, many disciples expected Jesus to return within their lifetimes.
This is the explanation that Jesus gave to Maria Valtorta regarding the controversial verse:
: “This generation (I was surrounded by the Apostles and disciples, that is, believers in Me) will not pass away, this generation of My sons, of the sons of God - because whoever believes in Me and welcomes Me is born in God and of God, and acquires the right to be a son of God, as was said by John in the beginning of his Gospel and in his first Epistle (Chaps. 4 & 5) - this generation will not pass away before the end of the world comes with all its foreshadowing and final signs.” Because if it is true that at the end of time there will be little faith, since few will have known how to persevere to the end by resisting the doctrines of the false prophets, of the antichrists or (if you prefer) the sons of Satan, it is also true that faith in Me will not die, and there will be those who believe in Me on every continent. Therefore “this generation,” Mine, that of the “sons of God”, will not have passed away, died, or been destroyed, before I return. Thus was My phrase to be interpreted, and thus should it be interpreted in order to be understood in its truth. But be patient with him who understands it badly, even if he is an Apostle or Scholar, bearing in mind that even the Apostle and Scholar is still and always a man.