The punishment for adultery is flogging with 100 stripes for both sexes in Surah 24:2, versus lifelong house arrest for the woman and no punishment upon repentance for the man in Surah 4:15-16.
The woman and the man guilty of illegal sexual intercourse, flog each of them with a hundred stripes. Let not pity withhold you in their case, in a punishment prescribed by Allâh, if you believe in Allâh and the Last Day. And let a party of the believers witness their punishment. (24.2 )
And those of your women who commit illegal sexual intercourse, take the evidence of four witnesses from amongst you against them; and if they testify, confine them (i.e. women) to houses until death comes to them or Allâh ordains for them some (other) way. (4:15 )
And the two persons (man and woman) among you who commit illegal sexual intercourse, punish them both. And if they repent (promise Allâh that they will never repeat, i.e. commit illegal sexual intercourse and other similar sins) and do righteous good deeds, leave them alone. Surely, Allâh is Ever the One Who accepts repentance, (and He is) Most Merciful. (4:16)
At the end of 4:15 the verse read “or Allah ordains for them some (other) way”. The other way were then described by Allah in 24:2.
4:16 described 2 persons i.e. man and woman not women only.
therefore, no contradiction.