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.
Your prayer is correct. Uttering the intention is not a pillar of Salat, nor is it one of its obligations. It is not even a desirable act of the prayer. Rather this is a Bid'ah (innovation) which some of the late followers innovated.
It is not confirmed that the Prophet (Sallallahu Alaihi wa Sallam), or one of the companions, or one the pious predecessors, ever uttered it.
Ibn Al-Qayim (may Allah have mercy on him) said in Zad Al-Mi'ad: 'The Prophet (Sallallahu Alaihi wa Sallam) used to say when standing up for prayer: 'Allahu Akbar,' and did not utter anything before it, never uttered the intention (Niah), and never said, 'I pray for Allah such and such prayer in the direction of Qibla, with the intention of an Imam, or with the intention of a follower to perform, the prayer which is due at that moment, or make up for a missed prayer, or the actual prayer. These are ten innovations that absolutely no person reported that the Prophet (Sallallahu Alaihi wa Sallam) ever uttered, with a Sahih narration or weak narration. And none of the companions uttered them, and none of the pious predecessors or of the four Imams said that 'it is desirable to do so.'
It is only desired by some of the late followers. Since you intended to pray the prescribed prayer there was no harm in your not uttering the intention, rather you have to stop uttering it after knowing the guidance of the Prophet (Sallallahu Alaihi wa Sallam), his companions, and the righteous predecessors.
Allah knows best.