Running for 30 minutes burns about the same calories as a McD burger. Not eating a burger is easier than running for 30 minutes.
Genetics may be associated an equilibrium weight and shape - but simple physics suggests that:
energy (food in) minus energy out (keeping warm and exercise) = weight gain or loss
The solution, as you say, is stop eating rubbish, stop eating as much (eat when hungry, not when you don't feel full), exercise if really motivated (but see first para).
Change behaviours to to make sensible consumption the norm - cut out cakes, sweets, biscuits, desserts, late night snacks. Make pizza and takeaway a treat not routine. Convince yourself to pay for quality over volume (a bit like tools - by cheap, buy twice).
If you deviate - feel guilty and chastise yourself. Don't justify it as deserved "because you have worked so hard". Self delusion is seductive.
40 pounds in 6 months would be impressive - good luck.