Starchy foods are not inherently fattening. Weight gain typically results from eating more calories (from any source[1]) than your body uses. The origin of the calories can also play a role: calories from foods that are energy-dense (high in fat and sugars) and poor in micronutrients promote further weight gain[2].
Starchy foods have an important role in a healthy and balanced diet: all food-based dietary guidelines recommend that our main source of energy comes from starchy foods.
1.World Health Organisation. Obesity and Overweight Fact Sheets. Updated June 2016. http://www.who.int/mediacentre/factsheets/fs311/en/
2.Diet, nutrition and the prevention of chronic diseases: report of a joint WHO/FAO expert consultation, Geneva, 2003