You may want to also familiarize yourself with the notion of
jury nullification, as it's called in the USA, or various similar names in other countries. Essentially the jury can deliver any verdict whatsoever, as their conscience dictates, no matter what the facts of the case were.
Which really is a core concept in the whole idea that you can only be convicted by a jury of your peers. If there were any such thing as someone else than the jury deciding what is the "right" or "wrong" verdict -- no matter if we're talking the judge, the general public, or whatever -- and any pressure on the jury to reach that one, then really you're more like tried by whoever decides that than by the jury.
So basically you can only tell the jury that they're supposed to judge the evidence presented in court, but you can't tell them what conclusion follows from it. They can reach any conclusion they wish. Even one that is contrary to the facts.
Which in practice means that essentially they can even overrule the law.
At least in theory, it's not even a bad thing anyway. I mean, a jury could decide not to convict an activist like Rosa Parks, because they just think the law is unjust and shouldn't be applied.
Or equally they can decide that in this case the defendant just did the teenage boy a favour, and he should just count his lucky stars instead of making a fuss about it. You get the idea by now that not only some think that way, but some would only use it at most to argue that a 14 year old girl should be fair game too. It's not hard to imagine the possibility that you could get enough who think that way in a jury, and the rest is history.
At least in the USA there is some counter balance in that it starts with a larger pool of candidates for jury duty, which get interviewed, and both sides (typically the lawyer and the DA, unless the guy wants to represent himself) can ask that a certain candidate be removed from the pool. So if a guy comes across as some rabid men's rights type, you could ask to exclude him from a rape case.
IIRC, up to a certain number, you can even remove even without saying why. Like, if you're the defense lawyer in a rape case, you can simply remove some women; be aware though that the DA will likely do the same with men.
And if it looks like you can't possibly get an impartial jury -- e.g., because you're trying a black guy in a small and rabidly racist town -- you can even ask to have the case tried somewhere else. It may or may not be actually granted, but if you think you could make that case in any other court, you may want to get your objection on record (along with anything else you can object to), just for use when you file an appeal.
So in most cases it's at least not that probable a problem that you get a jury prejudiced against one side from the start. Well, not unless the defense lawyer or DA REALLY suck at their job.
NB: I'm not saying that this is necessarily what happened here. If indeed the law says that you're innocent if you genuinely misunderstood how old that guy or gal is
(*), and they thought that there is indeed reasonable doubt that this is what happened, this could be their very sincere verdict.
(*) Cue the Family Guy gag:
Quagmire: Hey there sweetie, how old are you?
Connie: 16.
Quagmire: 18? All right!
Connie: Mom!
Quagmire: I like where this is goin'. Giggety, giggety, gig-get-ty