NOTE: Since it is not possible to give a concrete answer to this as we do not know how this prophecy will unfold yet, this is only my own inference based on canon references.
It cannot be Viserys because he had already died in AGOT. We did not know about this vision until ASOS as you mention. And Stannis saw it a long time after Viserys had died. As far as I recall, Fire does not let you see the past like Greenseers can (Joff's death is kinda complex. I can't recall if Mel saw his death in future or in present at nightfire).
It is unlikely that he was misled into reading the fire that way by Melisandre because Stannis saw this on his own. Besides, Viserys did not turn to ashes. He did not even had a finger set on fire. Only his silken clothes burnt.
From AGOT:
The sound Viserys Targaryen made when that hideous iron helmet covered
his face was like nothing human. His feet hammered a frantic beat
against the dirt floor, slowed, stopped. Thick globs of molten gold
dripped down onto his chest, setting the scarlet silk to
smoldering... yet no drop of blood was spilled.
Also by the time of ACOK, Iron Throne knew Viserys Targaryen had died.
"Sit," Joff commanded, gesturing her to the empty seat beside his own.
"Have you heard? The Beggar King is dead."
"Who?" For a moment Sansa was afraid he meant Robb.
"Viserys. The last son of Mad King Aerys. He's been going about the
Free Cities since before I was born, calling himself a king. Well,
Mother says the Dothraki finally crowned him. With molten gold."
We can assume that word must have passed at least in the nobles so in all probability, Stannis knew about it as well. So he might have also thought that he was looking at fate of Viserys unless he was convinced that he wasn't.
Nevertheless, by ADWD, it was a common knowledge even in lands as far as White Harbor in North. If they knew, we can assume that Dragonstone must have known before them seeing as Dragonstone is the closest Westerosi land in vicinity of Essos. From Davos Chapter 15, ADWD:
"You're bloody mad", said an oarsman off Storm Dancer. "The begger
King's been dead for years. Some Dothraki horselord cut his head off."
Nightfire only shows you present, future and possible future. It does not show you the past so I could not have been recap of Viserys' death. As Stannis said to Mel in ASOS:
“In the nightfire.” Stannis and Melisandre came through the door
together. “The flames are full of tricks. What is, what will be,
what may be. You cannot tell me for a certainty...”
The crown Stannis wears is described as:
A crown of red gold wrought with points that look like flames.
I believe he saw himself in the vision and it shows that his quest to gain the throne will ultimately be failed, no matter before gaining the throne or afterwards, because his own acts and powers will destroy him. The quest is already taking a toll on him as Mel noted that she could not make another shadow baby with Stannis because his Fire were burning too low & it might kill him. He has started looking gaunt and weak with everyday passing. Anyhow, I believe it predicts his own death.
He is Robert's heir and thus a King. But it is quite possible that Stannis just saw some other unknown King. He never said that the King was himself. Nevertheless, It was not Viserys. But It could be Stannis.