The final piece of the divine plan was to provide for a way out of the mistakes and missteps that would surely come as we used our agency here on earth. God knew that we could not always choose well. Sometimes, we must learn from our mistakes. That is only possible if the mistakes do not have eternal consequences that would prevent us from overcoming them. That is the plan of redemption. That is calling upon the name of the Son, who is the coming atoning Messiah.
The promise is that those who repent and do not harden their hearts can receive divine mercy and forgiveness through their repentance as enabled by the Son’s atonement. However, Alma chooses his words carefully, for the people of Ammonihah are not repentant, and have hardened their hearts.
Thus, he ends by saying that those who do harden their hearts, those who are like the people of Ammonihah, will be destroyed. This time, it is not a temporal destruction that is promised, but an eternal one.
Lest that sound too harsh, we must remember that Alma is speaking in absolutes. It is true that if one does not repent, they are cut off from God. It might not be true for all in Ammonihah, and modern revelation helps us understand that the opportunity to repent is extended beyond this life. Still, that was not the message Alma was delivering. He was delivering an ultimatum that they choose between good and evil.