"John dies at the end" initially was a web novel series by Jason Pargin (aka David Wong), one of the editors of cracked.com. This also is the reason why the book is somewhat episodic at times: It was not written and published at once, but one part after another.
Pargin later got a book contract for the story and it was published under the same title, which then finally was filmed into said movie.
So one likely explanation is that when the web series started under the title "John dies at the end", Wong/Pargin may have planned to actually kill him off and simply ditched the idea while the story developed.
An equally likely possibility is that the title is merely a joke. It certainly fits with the book's overall humor and also acts as a great tool to intrigue a possible reader and keep the tension up while reading ("Will John actually die?").
Major spoiler for people who haven't read the book (Not joking! Read the book first, it's great):
The title also cleverly subverts the reader's expectation in the book, because ultimately it is revealed that David is the one who dies. Unfortunately this twist does not make it into the movie.
One last view one could have on the matter is that, because the story explains time as a nonlinear construct (users of the "soy sauce" drift through time), John might actually be dead at 'the end', wherever or whenever that may be.
Robert Marley: Time is an ocean, not a garden hose. Space is a puff of smoke, a wisp of cloud. Your mind... is a flying corn snake hovering through all the possibilities.
However personally I don't find this to be a very good explanation for the title. I prefer to think of it simply as a clever and funny way to name your book/movie and the title is what actually got my attention and make me watch the movie.