The disciples died horrible deaths, all they had to do was say God and Jesus were not real and they would be spared, they couldn’t do that, because they knew who Jesus and god were.
Who says they were punished? You? Maybe in his eyes they were serving his purpose and when they leave this world...