TSA covers this on its website. The key is that what you are carrying is "medically necessary." That is established by the letter. Make certain that it is a letter on your doc's stationery and that it uses the words, "medically necessary" and describes specifically what is meant, e.g. apple sauce, baby food, and whatever.
Do not sweat this. Many, many people are on a soft food diet for all manner of reasons.
"Inform the TSA officer that you have medically necessary liquids and/or medications and separate them from other belongings before screening begins. Also declare accessories associated with your liquid medication such as freezer packs, IV bags, pumps and syringes. Labeling these items can help facilitate the screening process.
3-1-1 Liquids Rule Exemption
TSA allows larger amounts of medically necessary liquids, gels, and aerosols in reasonable quantities for your trip, but you must declare them to TSA officers at the checkpoint for inspection.
Remove them from your carry-on bag to be screened separately from the rest of your belongings. You are not required to place your liquid medication in a plastic zip-top bag. If a liquid, gel, or aerosol declared as medically necessary alarms, then it may require additional screening and may not be allowed."