What steps could people take to avoid children who are attracted to them magically? The nature of the attraction is that it induces in the nearby (around a km^2) children an ability to sense the attractor's location, and a desire to seek the attractor out. This is the only effect, and it cannot be blocked or contained. The steps to avoid the children should be relatively cheap and not overly burdensome, while still being effective. The method should also avoid using magic. The technology is at a modern level. The population with this attractive power is small, but still great enough in humber that useful services or products would be created
Their parents will prevent them from coming.
Take up residence in a neighborhood with children. You will attract them. Your house is locked. They will accumulate in your yard. It is a safe yard for children and it has some nice things and some chickens. Parents will notice the children are gone and go looking. Other parents will discover a lot of kids in your yard. They will be sent back to their respective homes. You will apologize.
Children will come back. Parents will now correctly guess where they have gone and come to collect them. You will apologize.
Parents will note the children making further efforts to go to your yard. They will prevent them from coming. Parents will take shifts collecting the ones who evade their own parents and bring them back to their own parents. Some parents will punish their children such that they no longer try to visit. Some parents will take the children on a daily visit to the yard and then home to get it out of their system.
Don't try to suppress the power - make use of it. Or find somebody who does.
- Teachers / on-site janitors at schools
- dentists / pediatricians / the former's nurses
- traveling ice cream salesperson / their spouse
- tour guides for child-friendly tours
- if it's short-range enough, a really good babysitter ...
Or, if the power is strong enough, and your dislike of children likewise, you could strike a deal with a child detention center. You would have to live on-site 24/7, but you could barter for a king's life in there. And even if some deliquent does find their way out of their designated housing, they will be much more easier to collect, since they'll be orbiting your house instead of roaming the world.
Besides @John Dvorak's excellent answer, there is an alternative solution if the character REALLY wants to avoid children as most as possible.
Work in a place that actively bars children
For example, in a nightclub. A few miscreants might try to sneak in to seek you, but they'll be deterred by security and / or other staff as they absolutely cannot be in the venue. You sleep during the times when they are expected to be out and about but they should be under someone else's supervision (e.g. at school or with parents / guardians)
If you also live in the place (e.g. in a loft upstairs), little chance to be ambushed during commuting and you can also have supplies delivered easily, and it gives you good cause to call the police / CPS on someone who is trying to reach you during the day
Doesn't something similar happens already in every house where there is a child? As soon as an adult has to use the restroom or take a shower, the child will want to follow him/her.
If the doors have a childproof lock, the adult will be able to enjoy the privacy alone, if not...
This is a common situation for certain people today. They have to avoid children. So, they map out where children are and don't go near those locations. Most parents keep their children fairly close to themselves or certain trusted locations. These people can't work in any of the occupations listed in @John Dvorak's answer. On Halloween, they keep the doors locked and lights out. When children are out playing in the street near them, they have to stay inside. They go shopping when most children are in school. (No, I don't have personal experience of these restrictions; I know some people who have them.)
An old solution, and justified for a magical minority that attracts children. Locate walled compounds in the country or industrial parks away from "normies." Jobs are close by in industrial parks and far from kids. Telecommuting would also work. Kids are either out of range or kept out by the walls and security. Most kids aren't going to be able to get through a wall or past a guard.
Besides, where are the parents? I would lobby congress for this, and screw civil rights. The harassment level would be such that these folks would flock to such communities, and it would likely also become mandatory living places for pedophiles. Yes, it's creepy and unfair. Ask minorities how they feel about being redlined, and ask whites if they want to leave their gated communities.
A device to accomplish this already exists: https://en.m.wikipedia.org/wiki/The_Mosquito
Youths are able to hear higher frequencies, and if they are emitted with enough power it might deter them while not affecting older adults much.
You induce in children the urge to locate you and seek for you. You can consider using a diversion. If you know the nature of the attraction be it magical or be it physical, you can use this knowledge in your advantage. Try constructing a device that mimics your ability to induce. You can place these on flying mechanoids. Program them to make them fly to children. The children will be looking for hot mechanoid instead of you.