Okay — so you told him you were 30, but you’re 39, and he told you he was 26, but he’s 24.
It sounds like he doesn’t want to date you because you lied, or else he doesn’t want to date you because you’re 39 and doesn’t want to come out and tell you he thinks you’re too old for him. Either way, you’ve lied, he’s found out on his own, and he’s now done. 😳 The fact that he lied, too, and you lied again by not telling him you know he lied (I know this is a little complicated), means that the path you were on with him wasn’t necessarily destined for real intimacy that requires honesty.
I think you’ve done all you can do here. He’ll either come around or not, but my advice is for future cougar dating: You don’t have to tell him your age, but don’t lie about it. You can be coy without shaving nine years off your age to his face. This isn’t an acting gig where you’re trying to appear younger in the face of ageism. This is a real person who wants to be able to trust you. If you treat him like someone who doesn’t deserve the truth, he’s going to be a boy toy who will never be close to you, or he’ll take offense.
It’s fine to have an age gap, and frankly, the one you actually have, he being 24 and you being 39, is totally do-able — but if you want something long term, honesty is more important than an age gap.