The kinds of treats you use are relative to what the parrot likes. To find out what it likes you should introduce it to as many foods as possible and see which ones it is most eager for or picks out of a mix. Don't feed those any more except as rewards for training.
The parrot is probably flying away because it is bored, wants to do something else, or is scared. All of this can be solved by
taming/training your parrot and by providing fun things to do near you. Still, this isn't a guarantee that it will spend all it's time with you because it has free will and wings. However, you'll be glad to know that all the time it does spend with you, it is because it chose to and not by force.
When you do training with your parrot, not only are you teaching it the behaviors, but you are also showing it how good you are to it. You are a source of good things and naturally good times. The parrot will realize that it has a better/safer time when around you than elsewhere and will learn to fly to you instead of away from you. But don't get upset when it wants some alone time cause it will happen some times.
Set up a stand/climbing tree near where you spend a lot of time. Put toys on there and try to use positive things to get it to stay there. On the flip side try to take fun things away from where you don't want it to be. For example don't hang toys on top of the parrot's cage or that just encourages it to go there. They love going on top of their cage as it is so there's no need to encourage it any more than that.
Also, take a look at
this response I wrote to another African Grey owner with a similar problem. Yours is still young so the sooner you teach it how to spend time together, the less likely you will develop stronger issues later on. Whatever you do, resist the temptation to clip the parrot. It's not the parrot's fault and clipping only masks the problems and doesn't solve them. Keeping an African Grey flighted is fantastic exercise and a strong deterrent to plucking, screaming, and other common problems.
Some more reading:
Check out the articles on this forum from the articles index.See my Parrot Training BlogIf you are in the US, consider buying some Parrot Training Perches because they are really helpful with flight recall training and become a home base for the parrot to fly to (and poop on a newspaper from) at home and if you take it places.