Flamethrowers are almost useless in a modern warfare sense. The uses of a flamethrower have been taken over by other weapons.
For clearing buildings in close combat. Grenades. Plus they are a lot lighter and you can give lots of people them. Plus they can be thrown around corners, and then you can hide, while a flamethrower requires full exposure. Add to this fully automatic weaponry with the ability to shoot through most indoor cover, and the average soldier is almost equivalent to a flamethrower trooper.
Secondly, fire is very hard to control. This makes them extremely hard to use in jungles, and urban areas. The chances of the fire spreading in your direction are very high.
Thirdly, in terms of flame based weaponry, conventional fire weapons have been replaced almost entirely. Napalm earlier, and now white phosphorous. It is similar to mustard gas. White phosphorous has an added benefit that it can also be used as a smokescreen depending on the amount released. (If you misjudge, then awe well. At least nobody important was killed. This is the attitude used by the US army in Iraq.)