Why does John/Jonah write this story when he knows that it will not be read by anyone since mankind is dying?
First and foremost, we have to consider what John represents. First of all, his name---John is perhaps the most common name in the English language, indicating a sort of "everyman" quality. Vonnegut intends for the reader to at least make a marginal connection with John, creating the impression that he is essentially a stand-in for the rest of us, facing and reacting to extraordinary circumstances.
As far as why he writes his story, there is no one concise answer. Taking the name "Jonah" indicates that John considers himself something of a prophet. As such, it is his responsibility to deliver the "divine message" regardless of whether or not it will be heard. Figuratively, he succeeds---you the reader, by virtue of having read the novel, have received the message.
Additionally, Vonnegut never intends for John to be an objective observer. He may create that illusion, but Vonnegut uses John as his "voice" to deliver social commentary. However, Vonnegut recognizes that he himself is not always capable of being objective. By its very nature, first person narration is always biased.