Dealing with children as a grandparent feels like tunnelling around them sometimes. When my eldest grandson was six he too decided he didn't like me and it was very tempting to overdo it in every way to "win back" his affection.
Instead, I didn't make any fuss at all of him - if anything I was a little cool in comparison to his brothers and sister - and generally ignored anything unpleasant he said. However, if there was a special treat to be given, he understood he was not automatically first in the queue because "like"can work both ways.
It was very hard to keep a cool head, not grab him in a big hug or even constantly defer to him, but I kept it up. After a couple of weeks, I noticed a distinct thawing on his part and that he was the one making the moves to ask questions, volunteer for things, tell jokes or generally try for the limelight.
This may not work for everyone, but it worked for me. Interestingly, his twin sister observed the interaction - or lack of it - and was, unusually, critical of him. The temptation for me was to feel hurt and/or emotional when, really, they are still just children and we are the adults and we need to show them that actions have consequences.