Having looked after all manner of different children including special needs children, I've come to realise some children love hugs and affection while others loath it.
As a parent you learn to work around the different personalities of each child and some are easier to take care of than others, yet that doesn't stop me trying to be good, respectful and understanding to all of them.
One special needs child isn't fond of hugs or being touched, at least not without asking first. Sometimes the answer to a hug is no and sometimes the answer is yes.
This same child will come up to me and say they need a hug to which I oblige, and other times if I go up to them as say I need a hug they oblige.
Mostly, with this child I'll show them a brief sign of affection; a light touch of the shoulder as I pass them, maybe I'll touch their hair, or their head. Just a small sign that I'm thinking of them, a small sign that says "Love you".
I will wait to read their body language and gauge their mood. Are they feeling friendly and warm or are they feeling removed and distant? Then I adapt my movements around them accordingly.
The same child doesn't like to be complimented, especially related to looks, yet if they do something cool and I say "That's clever," I can see that appeals to them. In that moment they feel appreciated, seen, relevant, important, clever.
Even if you have a child who isn't fond of affection there are still ways to let them know they matter and you care.