This falls under the category of failing to confess for reasons that were not under your control…although in the future you need to say, “I have more than 1 or 2 mortal sins to confess”. Then let the priest decide whether to hear you out or re-schedule you. You honestly did the best you knew to do, though, so that mistake wouldn’t be held against you.
And yes, if you really and honestly didn’t know whether or not a sin was grave, you would have still sinned by committing an act you knew to be wrong, but it would not go into the realm of willfulness required for a mortal sin. You have to give full consent with appreciation of the gravity of what you’re choosing and have enough freedom from habit to choose freely. We should not presume upon God’s mercy, but the matter of rejecting eternal life isn’t a juridical game of “gotcha!” It is a judgment that one truly made a willful decision to turn from God and the just demands of love in order to obtain the fleeting payments of evil.
You do need to arrange to talk to a real confessor about the details of what happened, though, OK? Except on the most theoretical level, this is a matter to be attended to by a physician of the soul. Don’t rely on what we say. Get your answer from a confessor.