Each of these chapters contain a sense of doom and then it is followed by a promise of restoration. Here this chapter is focused on Egypt and the role that they played in welcoming in the people of God who were told to stay home and not run away from the impending doom that was coming at the hand of Babylon. But there was a whole group of exiles who left Israel and fled to Egypt hoping that they would be protected there. But Babylon and king Nebuchadnezzar makes his way to Egypt and conquers Egypt and those who sought refuge there are transported to Babylon anyway. If they had stayed put they would have been able to stay in Israel. But they fled against he wishes of Ezekiel and against the wishes of the Lord.
If you look at vs.21 you see then a shout out to the future and the potential for a horn to rise up and the possibility of this horn bringing the people back to God. If you look at Psalm132:17 it speaks about a horn rising back up and reestablishing the kingdom of David. That is what the people of God want all along, and God promises that it will happen.