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.
Indeed, you did well by repenting from this relationship and from committing Zina (fornication or adultery). Now, you are obliged to avoid any means that may lead you to this sin in the future.
Therefore, you are not allowed to let any non-Mahram young man to talk with you and you are not permitted to talk to him on the phone or through the internet in order to ask about him or to congratulate him on the occasion of Ramadan or ‘Eed, or to thank him for contacting you, etc. All these are means that may lead you to unpleasant consequences and to committing the same sin again. Allaah Says (what means): {O, you who believe! Follow not the footsteps of the devil. And whosoever follows the footsteps of the devil, then, verily he commands Al-Fahsha' [i.e. to commit indecency (illegal sexual intercourse, etc.)] and Al-Munkar [disbelief and polytheism (i.e. to do evil and wicked deeds, to speak or to do what is forbidden in Islam, etc.)}[Quran 24:21]
Moreover, this young man is not like your brother as you mentioned, rather, he is a non-Mahram man to you and you are obliged to totally avoid him. So, you should not write to him in order to apologize to him or anything else, and it does not matter what he may think of you. Indeed, you may change any means by which he may contact you, like your phone number and your e-mail address and so forth. The only exception that could be made is only the case of necessity or dire need, like giving a fiancé the number of your father or one of your male Mahrams so that the matters of your marriage could be arranged, and the like.
Allaah Knows best.