Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
Repentance is an immediate requirement that should be done as soon as possible. It should not be delayed for any reason. In fact, a person does not know when he will become unable to repent. So, before anything else, repent to Allah before you become unable to do so. Repentance should be sincere, i.e. giving up the sin, feeling deep regret for committing it and resolving not to commit that sin again. Know that the repentance is not accepted at the time of the death struggle as it is not accepted when sun rises from the West. Allah Says (interpretation of meaning): {… The day that some of the Signs of your Lord do come, no good will it do to a person to believe then, if he believed not before, nor earned good (by performing deeds of righteousness) through his Faith…}[6:158].
The Prophet (Sallallahu Alaihi wa Sallam) said: "Allah accepts repentance of everyone as long as he is not facing the agony of death."
As for your question, know that the ruling concerning the Zani (fornicator) is to be lashed 100 times. And an adulterer/adulteress should be stoned till death. Allah Says (interpretation of meaning): {“The fornicatress and the fornicator, flog each of them with a hundred stripes. Let not pity withhold you in their case, in a punishment prescribed by Allah, if you believe in Allah and the Last Day. And let a party of the believers witness their punishment. [This punishment is for unmarried persons guilty of the above crime (illegal sex), but if married persons commit it, (illegal sex)}[24:2].
This retributive punishment was applied during the era of the Prophet (Sallallahu Alaihi wa Sallam). The Prophet (Sallallahu Alaihi wa Sallam) also stoned the adulterer and the adulteress (married or previously married person who committed Zina).
But lashing the Zani or stoning him/her does not mean that the person who commits such act has to go to the Sultan (ruler or anyone acting on his behalf) and inform them that she/he committed Zina. But if it is proved that someone committed Zina or if he/she confesses having done so or if the non-married woman becomes pregnant, then the ruler should apply retributive punishment (Hadd) according to their situation.
Now the person who happened to commit Zina should cover himself/herself and should not tell anyone of what he/she committed as informing of the sin is a sin in itself. Al Hakim and Al Bayhaqi reported from Zayd Ibn Aslam that the Prophet (Sallallahu Alaihi wa Sallam) said: "…Whoever amongst you happens to commit any of these dirty sins, he/she should conceal himself/herself with the cover of Allah, (know that) whoever amongst you reveals his/her sin to us, we will apply the Hadd (retributive punishment) on him/her."
Moreover, uncovering one’s sin is not a condition in the validity of the repentance.
On the other hand, know that the Zania and Zani cannot marry unless both of them repent from their previous sin. Allah Says (interpretation of meaning): {"The adulterer - fornicator marries not but an adulteress - fornicatress or a Mushrikah; and the adulteress -fornicatress, none marries her except an adulterer - fornicater or a Mushrik [and that means that the man who agrees to marry (have a sexual relation with) a Mushrikah (female polytheist, pagan or idolatress) or a prostitute, then surely, he is either an adulterer - fornicator, }[24:3].
But if both of them repent to Allah from their sin, there is no objection to their getting married provided the woman waits one menstruation period after the fornication act.
Allah knows best.