This is exactly the question that was raised during the recent webinar. But it seems like the word "metal" is excessive. You will have no doubts regarding this if you have ever cleaned a chimney with your own hands. Much soot inside the chimney provides conductance to any dielectric chimney. Therefore, we will talk about any chimney.
If a chimney is elevated significantly above the roof ridge, the lightning strike into it is probable. And the lightning current will surely reach the gas-fired boiler installed on a wooden or a tile-covered floor. However, we should consider that the boiler is grounded because a gas chimney is secured to it. The reader may remind of the bitumen chimney insulation. But it will hardly keep high electrical strength for the years of operation. Moreover, it is useful to remember that document regarding lightning protection RD 34.21.122-87 does not consider the bitumen protection of foundation to be a barrier for the lightning current flowing. Finally, many boiler types are simultaneously used for water heating. Then a securely grounded water pipe is attached to it. Gas-fired water heater is also a grounding device. The lightning current will also go to the ground through it. Let's study the consequences.
Read article of Professor E.M. Bazelyan Protecting a Metal Chimney at a Cottage against Lightning for more details.