I am, or was a certified USAT, USA cyclist certified coach. Distance running requires fuel and hydration, so dieting per se while training for a marathon is I'll advised. However, the training required will burn mire than enough calories to slim you down, assume g your not eating a high fat, high calorie diet every day.
I trained for a marathon almost exclusively on a TM so it can be done. I ran a 3:15 that race too.
Good luck
Nova