What the others are trying to say is it sounds like he may be masturbating/trying to mate. Is it similar to the behavior in this video?
Cockatiel Behaviour| | Yes Boofy Is Masturbating - Yes It Is Hilarius - YouTube
Don't worry, it's nothing gross
It's actually a pretty common behavior, though I've seen it much more in cockatiels than cockatoos. Just gently remove him, tell him no, and redirect it into more appropriate behavior. Ideally, we want our parrots to see us as a flock member, not a mate. Letting him continue to masturbate on you will mean he sees you as his mate, which will lead to more possessiveness, aggression, and frustration on his part that can lead to plucking or biting. Goober has done this with me, starting regurgitating on my feet and trying to rub on them and I just pick her up, put her back on her playstand, telling her "no no, we're just friends!" and speaking very calmly until she calms down. You may want to not let him up on your shoulders as much, because then you're not in control of the situation.
Just go slow, keep an eye on it, and try to redirect it. Give him a toy, pick him up and move him somewhere else, etc. Don't make a big deal out of it, then he'll do it for attention. If he is trying to masturbate on you, then you'll also want to reassess how you pet him. In a flock, a flockmate will preen other members heads, but really only a mate would preen the back and lower body. Petting their back and under their wings can stimulate masturbation behaviors and should be avoided until they're less hormonal.