Unfortunately it does matter a lot especially for long distance running.
There are some who have a slightly higher BMI like Sisay Lemma (Won the Valencia Marathon, 4th fastest in the world, 175 cm/67 kg) and Feyisa Lilesa (2nd in Rio Olympic Marathon, 175cm/67kg)
>> Sisay Lemma
>> Feyisa Lilesa
As you have noticed, their leg muscles are much bigger than the other competitors, though it consumes more energy to run but gives them more explosive power.
Both of them are bottom heavy, lower body makes up majority of their body weight.
In general, it helps to lose weight as a runner. Of course, it doesn't mean heavier runners can't progress. Just that they are definitely slower than their potential.
A heavier runner could of course outrun a skinny runner based on personal observations, probably sporting background difference, run more, more leg muscle strength. Just to think of a few reasons, but that's definitely not the norm as like Ender pointed out.