Yep.
The fundamental brain structure changes with biological age. And literal synapses are built. I can’t see how they’d be magically changed with the “implant” of a consciousness.
Well, the premise offered in the OP did not ask us to assume that the structure of the brain was changed to be that of a 30 year old, such that it really was a 30 year old brain in the head of a 10 year old. So, we aren't required to assume that.
However, even if we were to assume that it was, like, a brain transplant - and a 30 year old man's brain was put into a 10 year old's body fully operational - I STILL would submit that the reason we don't have 30 year olds ****ing 10 year olds' bodies is not exclusively based on whether the 10 year old really wants it, likes it or "can handle" it. It has a lot to do with not wanting the pedophilic behavior to be encouraged or fostered. Allowing 30 year old pedophiles to **** 10 year olds, whether robot sex toys or brain transplant bodies, is prohibited because pedophiles need their behaviors checked, so they don't **** other 10 year olds too.
Like - why would it be illegal for AI pedophile porn to be created to show pedophiles -- so pedophiles can whack off to depictions of 10 year olds getting ****ed? Why not allow that? I think the idea is because we don't want the pedophiles further desensitized and their behavior further fostered. We as a society do not want the behavior normalized. It's one step closer and it will do something to a guy already disposed to wanting to **** kids, if they can watch hardcore porn of kids being ****ed. Take regular porn - one can see myriad videos online of grown women vigorously and enthusiastically perform oral sex on men. As most men are rather pro blowjob in general, does seeing women doing it on film make them less desirous of receiving blowjobs in real life? Of course not! It makes a man more likely to think that getting a blowjob is an expected part of sex. So, a pedophilic person, who sees that imagery, or has sex with child sex toy robots, etc., is going to have a mindset that what they are seeing and doing is normal and typical. I would put the brain transplant situation in the same boat as that. Saying "oh, you can **** kids, as long as the kids have had a brain transplant" doesn't seem to be a great public policy, because the pedophiles themselves are going to just be encouraged in their pedophilic behavior such that other kids who haven't received brain transplants will be at risk. And, you'll get defenses raised that the pedophile thought the kid had a brain transplant, etc.
And, I can see where this OP might go with the next hypothetical -- what if a 30 year old "identifies as" a 13 year old - does that mean the 30 year old should be allowed to have sex with "biological" 13 year old? Or, what if a 10 year old "identifies as" a 20 year old? That kind of thing. Should we presume they "know who they are"? But, again, the law isn't really based on the individual minds of the children involved. It's a cut-off to provide broad, statistical protection to masses of people so we do not have to make difficult or impossible determinations as to the mental acuity of underage kids.