Scientists from Tufts University say food addictions can be changed in this way even if they are well-established.
Scans of the brain's reward centre showed that food preferences had changed
They scanned the addiction centre in the brains of a small group of men and women.
The results showed increased cravings for healthy lower-calorie foods.
Prof Susan B Roberts, senior study author and behavioural nutrition scientist at the Boston university, said: "We don't start out in life loving French fries and hating, for example, wholewheat pasta.
"This conditioning happens over time in response to eating - repeatedly - what is out there in the toxic food environment."
Scientists know that once people are addicted to unhealthy foods, it is usually very hard to change their eating habits and get them to lose weight.
But Prof Roberts' research, published in the journal Nutrition & Diabetes, suggests the brain can learn to like healthy foods.
They studied the part of the brain linked to reward and addiction in 13 overweight and obese men and women, eight of whom were taking part in a specially designed weight-loss programme.
This focused on changing food preferences by prescribing a diet high in fibre and protein, and low in carbohydrates, but which did not allow participants to become hungry because this is when food cravings take over and unhealthy food becomes attractive.
The other five adults were not part of the weight-loss programme.
When their brains were scanned using MRI at the start and end of a six-month period, those following the programme showed changes in the brain's reward centre.
When participants were shown pictures of different types of food, it was the healthy, low-calorie foods which produced an increased reaction.
The study said this indicated an increased reward and enjoyment of healthier food.
The brain's reward centre also showed decreased sensitivity to the unhealthy, higher-calorie foods.
The Boston researchers say that gastric bypass surgery, while solving the problem of weight loss, can take away food enjoyment rather than make healthier foods more appealing.
"There is much more research to be done here, involving many more participants, long-term follow-up and investigating more areas of the brain," Prof Roberts said.