All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallaahu ʻalayhi wa sallam, is His slave and Messenger.
It is obligatory on you to perform the ʻIshaa’ prayer, because you have not performed it. What you prayed was done with the intention of another prayer, and it is known that actions are judged according to the intentions behind them. Scholars stated that it is obligatory to specify the intention of the particular prayer.
Az-Zarqaani commented on Mukhtasar Khaleel, saying, “The statement, ‘and the intention of the specified prayer’ means that the third obligation in this regard is the intention of the specified prayer, whether it be the Thuhr, ʻAsr, Witr, Fajr, or Kusoof (eclipse prayer); it is insufficient to hold the (general) intention of performing an obligatory or a voluntary prayer; rather, the intention must be specified.”
An-Nawawi wrote, "When a person performs an obligatory prayer, he has to specify two elements in his intention according to the scholarly agreement: firstly, he is required to evoke the act of performing that prayer while being distinct from other acts of performing prayer. It is insufficient to hold the general intention of that prayer while being oblivious to the act of performing that prayer in particular. Secondly, he must specify that particular prayer which he is performing ,whether it be the Thuhr, ʻAsr, or any other prayer.” [Al-Majmoo’]
In brief, you are required to perform the ʻIshaa’ prayer.
Allah knows best.