I thought there was a clause for this sort of thing, but maybe I'm mistaken.
Regardless - I'd imagine the problem comes from the way we perceive the two sides here.
Lawmakers (and voters I suppose) don't like the idea of teens having sex in the first place. This is a scenario where, even though someone didn't do anything intrinsically wrong (had sex with someone 2-3 years younger), the "innocent" party still did something that people consider dirty.
And I think that expectation that teens "shouldn't" have sex conflicts with the reality of the situation. Too often the same people enacting and voting for these laws are also in favor of abstinence only education, which has been proven to not be an effective deterrent for teen pregnancies. "Don't drive" isn't a useful piece of advice for avoiding automobile accidents. "Don't get on the Internet" isn't a useful piece of advice for avoiding computer viruses. "Don't have sex", likewise, isn't useful for teaching hormonal teenagers how to deal with their budding sexuality.
If anything, creating a taboo around sexuality makes it more enticing to rebellious teens.
You might be thinking of so-called "Romeo and Juliet" laws. Judging from this link he'd not qualify if they were in Indiana anyway, and from here it could be argued to be legal, though it depends on whether or not it affects someone who's legally an adult with a minor.