He used not to do ghusl for janaabah out of ignorance; should he make up the prayers?

When I was in the first year of middle school, one of my relatives told me about madhiy and told me that it is what comes out with desire. When I reached the third year of middle school, I took a lesson about madhiy and how to purify oneself from it. After that, every time I became junub I would wash my penis and do wudoo’ for prayer, because I did not know that it was maniy. When I learned the ruling nearly three years later, I was upset about the prayers that I offered (when I was junub). Do I have to repeat them because of my misunderstanding?.

Praise be to Allaah.
The difference between madhiy and maniy is well known. For more information please see the answer to question no. 2458. What the Muslim is required to do is learn what he needs to know in order for his belief, worship and dealings with others to be sound. 
If a person offers many prayers without having purified himself correctly, because he was unaware that purification was obligatory, he does not have to repeat them, according to the correct opinion. 
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:  
Based on this, if a person did not purify himself as prescribed in sharee’ah because the text had not reached him, such as if he ate camel meat and did not do wudoo’, then the text reached him and he came to know that it is obligatory to do wudoo’ after eating camel meat, or if he prayed in a camel pen then the text reached him (which says that it is not allowed to pray in camel pens), does he have to repeat the past prayers? There are two opinions, both of which were narrated from Ahmad.  
A similar case is if a man touches his penis and prays, then he finds out that the one who touches his penis has to do wudoo’.  
The correct view in all these cases is that he does not have to repeat the prayers, because Allaah has forgiven things done by mistake or out of forgetfulness, and because He says (interpretation of the meaning): 
“And We never punish until We have sent a Messenger (to give warning)”
[al-Isra’ 17:15].  
If a person has not heard of the command of the Messenger of Allaah (peace and blessings of Allaah be upon him) concerning a particular matter, then the obligation is not confirmed in his case. Hence when ‘Umar and ‘Ammaar became junub and ‘Umar did not pray and ‘Ammaar prayed after rolling in the dust, the Prophet (peace and blessings of Allaah be upon him) did not tell either of them to repeat the prayer. Similarly he did not tell Abu Dharr to repeat the prayers when he was junub and did not pray for several days. And he did not tell those of his companions who had eaten until they could distinguish the white thread from the black thread to make up their fasts, and he did not tell those who had prayed facing Bayt al-Maqdis (Jerusalem) before news of the abrogation reached them to make up those prayers.  
A similar case is that of the woman who was suffering from istihaadah (non-menstrual vaginal bleeding) and had not prayed for some time because she thought that she did not have to pray. There are two views as to whether such a woman has to make up the prayers she missed. One view is that she does not have to make up the prayers – as was narrated from Maalik and others – because when the woman who was suffering from istihaadah said to the Prophet (peace and blessings of Allaah be upon him): “I have been bleeding heavily for some time and it prevents me from praying and fasting,” he told her what she should do in the future, and he did not tell her to make up the prayers of the past.  
 End quote from Majmoo‘ al-Fataawa, 21/101 
See also the answer to question no. 45648 
But you should do a lot of naafil prayers, because the naafil prayers will make up for any shortfall in the obligatory prayers. And you should seek to learn beneficial knowledge, because the Prophet (blessings and peace of Allah be upon him) said: “If Allaah intends good for a person, He causes him to understand Islam.” Narrated by al-Bukhaari (71) and Muslim (1037). 
May Allah help us and you to do that which He loves and which pleases Him. 
And Allah knows best.