It sounds like he might be having some acid reflux.
My son went through the vomitting and not wanting to eat thing. At first, I thought he had the flu. The doctor gave him some medication and told me to keep his head elevated when he slept. It went away almost immediately. He had a pain and burning sensation in his throat that triggered his gag reflex which made him throw up.
You should definitely keep track of what he eats and when and get him in to the doctor.
My son had a very healthy appetite other than when he was going through a growth spurt. The vomitting was upsetting, to say the least. Once we found out what the problem was, he was fine.
He's 17 now. He's 6'2" and weighs 200 pounds so his issue didn't stunt his growth by any means. He doesn't have reflux anymore, but he knows not to eat certain things after a certain time of day and he functions quite well. He still gets heartburn every once in a while and takes Tums, but it's much, much better.
Talk to the pediatrician to make sure that the things you are doing to feel like he's getting nourished aren't actually making it worse.
Best wishes.