# Why does thermal conductivity decrease from solids to gases?

I am learning in my heat transfer class that the thermal conductivity decreases from solids to liquids to gases i.e. $$K_{solid} > K_{liquid}>K_{gas}$$ The reason cited is that (based on my understanding) because the spacing between molecules increases from solids to gases, transfer of thermal energy becomes more inefficient, so the thermal conductivity decreases. This was fairly intuitive.

But we later learnt that, according to the kinetic theory of gases, the thermal conductivity is directly proportional to the mean free path. Mean free path is the average distance travelled by a molecule before experiencing a collision. So, $$\lambda_{gas} > \lambda_{liquid} > \lambda_{solid}$$

So, shouldn't $$K_{gas}$$ be the greatest? Both relations seem to go against each other. So are there other factors that compensate for this deviation?