Dragons are supposed to be spell and fire resistant so it's expected that the effects of a fire spell won't hurt them. However, the Fiendfyre spell is extremely powerful dark magic, cursed flames capable of even destroying a Horcrux. Would the dragon be affected by the fire? If so then how long would the spell have to be applied to turn the dragon to char?
Fiendfyre would probably affect dragons.
There’s nothing that makes it clear what exactly would happen if a dragon had Fiendfyre used on it. However, it would likely have some effect on them, though it may take longer than it usually would. Though they’re resistant to magic, dragons aren’t immune to it - it will eventually work in large enough amounts.
“Stupefy!’ they shouted in unison, and the Stunning Spells shot into the darkness like fiery rockets, bursting in showers of stars on the dragons’ scaly hides –
Harry watched the dragon nearest to them teeter dangerously on its back legs; its jaws stretched wide in a suddenly silent howl; its nostrils were suddenly devoid of flame, though still smoking – then, very slowly, it fell – several tons of sinewy, scaly black dragon hit the ground with a thud that Harry could have sworn had made the trees behind him quake.”
- Harry Potter and the Goblet of Fire, Chapter 19 (The Hungarian Horntail)
Fiendfyre isn’t ordinary fire, it’s a very powerful type of cursed fire that’s powerful enough to destroy Horcruxes.
“Fiendfyre – cursed fire – it’s one of the substances that destroy Horcruxes, but I would never, ever have dared use it, it’s so dangerous. How did Crabbe know how to –?”
- Harry Potter and the Deathly Hallows, Chapter 31 (The Battle of Hogwarts)
Horcruxes are also protected against most types of magic, so it seems likely that something powerful enough to destroy one is more potent than any type of average spells used.
“No,’ said Ron, before Harry could answer. ‘So does it say how to destroy Horcruxes in that book?”
“Yes,’ said Hermione, now turning the fragile pages as if examining rotting entrails, ‘because it warns Dark wizards how strong they have to make the enchantments on them. From all that I’ve read, what Harry did to Riddle’s diary was one of the few really foolproof ways of destroying a Horcrux.’
‘What, stabbing it with a Basilisk fang?’ asked Harry.”
- Harry Potter and the Deathly Hallows, Chapter 6 (The Ghoul in Pyjamas)
From this it seems likely that if a dragon is exposed to Fiendfyre for long enough, it will burn. However, there’s no way to confirm that for certain because no similar situation is ever described.