As someone with chronic illness, this is both true & potentially ablest. "Better" is a subjective term, as this could mean "Doctors do not deserve pay;" but also keeping a healthy diet & lifestyle prevents me from needing to see a doctor less often... Due to chronic illness, I will always need to pay for a doctor... If better means "cheaper," then yes. It is cheaper to pay the grocer/farmer... But that is a whole different discussion altogether. People still need to see doctors for chronic issues or for checkups & routine care.
As someone who does come from a very ill population in a rural farming/fishing/hunting area, this is a major problem. Poor access to diet (largely due to lack of funds) among the local population also means that there is a high rate of poor-diet related illnesses (diabetes, obesity, heart disease). One of my doctors commented that I was one of his few "healthy" patients.
So... It is a complicated issue. As someone with chronic illness, a healthy diet is important, yet it cannot resolve all issues I will need to see a doctor for, routinely. Both are important and as health insurances refuse to pay for nutritionists, it is a bigger conversation than just "eat whole foods." People need access to well-vetted information on nutrition and how to eat healthily, access to healthy foods, and healthcare.