The basis for this teaching is, as noted in another answer, is found in John 21:21-23, where Jesus, speaking to Peter, sidesteps a question regarding John's future death. More direct teaching is found in Doctrine and Covenants 7, where Jesus is quoted as saying:
1 And the Lord said unto me: John, my beloved, what desirest thou? For if you shall ask what you will, it shall be granted unto you.
2 And I said unto him: Lord, give unto me power over death, that I may live and bring souls unto thee.
3 And the Lord said unto me: Verily, verily, I say unto thee, because thou desirest this thou shalt tarry until I come in my glory, and shalt prophesy before nations, kindreds, tongues and people.
The LDS Church's summary of this is as follows:
The latter-day scriptures clarify that John did not die but was allowed to remain on the earth as a ministering servant until the time of the Lord’s second coming. (Guide to the Scriptures)
So yes, John is on the earth. As to his location, however, we don't have much in the way of details. The student manual to the Doctrine and Covenants, however, reports two appearances. The first is that Joseph Smith reported that the Apostle John (along with Peter and James) appeared to him and Oliver Cowdery in 1829. LDS historians generally hold that John, unlike the others, was not resurrected for this appearance, but rather "translated," that is, physically changed by God from a mortal to immortal being. As McConkie writes:
At that appearance, Peter and James were resurrected beings; John was translated. (Mormon Doctrine, pg. 572)
A separate appearance was reported by Heber C. Kimball at the dedication of the Kirtland Temple in 1836. (Whitney, Life of Heber C. Kimball, pp. 104)
More generally, the manual continues, there is one teaching from Joseph Smith that provides insight into why John's location is such a mystery:
In a conference of the Church on 3 June 1831, the Prophet Joseph Smith taught concerning John’s ministry: “John the Revelator was then among the Ten Tribes of Israel who had been led away by Shalmaneser, king of Assyria, to prepare them for their return from their long dispersion” (History of the Church, 1:176).
This is a reference to the Ten Lost Tribes of Israel, which were dispersed following the Assyrian conquest, and whose location is unknown. There is "speculation" that they went to the north, but "The Lord has not seen fit to reveal their location, [...] and until he does so, it is useless to try to identify their present locality." (Old Testament Student Manual, D5)
Thus, from Smith's teaching, John is (or at least was) "among" this dispersion of Israel, but we aren't meant to know where that dispersion is.