I think if my partner made a big deal about something I did 24 years ago I would dump HIM.
My dh made a similar mistake. He won't thank me for telling you but he was travelling around Thailand and went to a massage parlour. He did not intend to pay for a prostitute, he thought he was getting a Thai massage, it wasn't a particularly seedy joint. She gave him more than a massage and he went along with it but then came away feeling dirty and ashamed.
He told me this when we'd been together about 2 years. He just blurted it out and told me how ashamed he still felt but he didn't want it to be a dirty little secret.
This is a man who does not use porn, who respects women, who is a committed father and a genuinely supportive and loving husband. He made one mistake many years ago. He let his moral guard down.
I bet we've all made mistakes. I bet we have all done one thing that we are ashamed of. How would we feel if someone chose not to forgive us even after 24 years? Even if they were not directly involved?
People change ffs.
This boyfriend might still be a wanker for all we know. But he told her because he wanted to be open and honest. He didn't want to hide anything and that's an admirable trait. Most men wouldn't have mentioned it.
I get the feeling the OP just wants to dump him anyway and wonders if this is a convenient excuse.