Nobody here is noting that, if you “had no idea” that your sin was one of grave matter, then it is not a mortal sin. Nonetheless, I would confess it anyway, because it seems to be burdening you seriously. Just do it; don’t let it afflict your conscience.
Please understand as well the willful concealment of a mortal sin in the confessional is itself a mortal sin and invalidates your entire confession. Because the full knowledge aspect was lacking, it does not look here like that was in play. Again, though, I would note to your confessor that you concealed this. I think you should do this for the sake of the development of your conscience. I take it from your writing style that you are young. This would be a good moment for your confessor to straighten out any views regarding your relationship to the confessional, and, indeed, to the Sacraments generally and to the Church, that may be leading you astray or afflicting your moral sense. It is important to do this before such matters as concealment of sin become a habit. I doubt you need to worry that you are living in mortal sin based on this event two years ago, but you should be proactive lest shame prevent you from confessing another volitional sin in the future. Please lay this dilemma before a confessor; he will be please to help you overcome this quandary of conscience.