Behold! Allah said: “O Jesus! I will take thee and raise thee to Myself and clear thee (of the falsehoods) of those who blaspheme; I will make those who follow thee superior to those who reject faith, to the Day of Resurrection: Then shall ye all return unto me, and I will judge between you of the matters wherein ye dispute.
Raising up of Jesus Christ to the heaven is a kind of hijrah
(and clear you of those who blaspheme)
This means that Allah shall separate Jesus from this corrupt society and cause him to enter among the righteous and the faithful servants of Allah. The Divine law regarding the Prophets has always been that they stay among the people that they are sent to until there is hope that they might respond and believe. This hope ends when they resolve upon assassinating the Prophet. At this time, with the permission of Allah, the Prophet emigrates and leaves them. Just as the body undergoes a process of decomposition and decay after separation from the soul, the deniers of the Prophet invariably suffer humiliation and defeat after his departure from among them. The Prophet and his companions leave behind the evil and corrupt society and build a new, healthy and wholesome environment that further strengthens them morally and spiritually. As against this, their enemies lose all the healthy and sound elements and consequently rush headlong toward their disaster. Ustādh Farāhī has discussed all the effects and consequences of the believers’ hijrah, (migration) in his commentary on Sūrah al-Kāfīrūn. The raising up of Jesus Christ to the heaven is a kind of hijrah and just as all the messengers received glad tidings of victory and success in its wake, he also received glad tidings of success and victory after this hijrah, as is stated in the following words:
I will set those who follow you above those who have rejected you, to the Day of Resurrection: Then shall you all return to me, and I will judge between you of the matters wherein you differed.
Jesus proclaimed of a Prophet to come after him:
“Nevertheless I tell you the truth; It is expedient for you that I go away:
for if I go not away, the Comforter will not come unto you; but if I depart, I
will send him unto you. And when he is come, he will reprove the world of
sin, and of righteousness, and of judgment: Of sin, because they believe
not on me; Of righteousness, because I go to my Father, and ye see me no
more; Of judgment, because the prince of this world is judged. I have yet
many things to say unto you, but ye cannot bear them now. Howbeit when
he, the Spirit of truth, is come, he will guide you into all truth: for he shall
not speak of himself; but whatsoever he shall hear, [that] shall he speak:
and he will shew you things to come. He shall glorify me: for he shall
receive of mine, and shall shew [it] unto you.” (John 16: 7-14)
(See the following post: Jesus (peace be upon him) according to the New Testament Bible – Islamic Web Library)
The reason why Jesus will returm in the end times:
Islahi, Amin Ahsan. Pondering Over The Qur’an: Surah Ali Imran (pp. 136-137). Islamic Book Trust. Kindle Edition.