Form a purely technical perspective, #2 is right, it's just awkward as all hell.
You would say the book IS John's. If you said it's a book of John it means the book is *about* John. You use #2 about as often as you would use the phrase "a book of mine". (I went into the library to return a book of mine as well as a book of John's) It's conceivable, but safer to just stay away from that whole sentence in general.
So technically both are correct, but don't use the second sentence in public :)