22 Jesus saith unto him, If I will that he tarry till I come, what is
that to thee? follow thou me.

23 Then went this saying abroad among the brethren, that that disciple
should not die: yet Jesus said not unto him, He shall not die; but, If
I will that he tarry till I come, what is that to thee?

Here, John seems to be saying "no comment" on a certain rumor that had gone around in the church, leaving it deliberately ambiguous. The Book of Mormon actually gives an authoritative answer to the question, and this is where the LDS belief comes from.

1 And it came to pass when Jesus had said these words, he spake unto
his disciples, one by one, saying unto them: What is it that ye desire
of me, after that I am gone to the Father?

2 And they all spake, save it were three, saying: We desire that
after we have lived unto the age of man, that our ministry, wherein
thou hast called us, may have an end, that we may speedily come unto
thee in thy kingdom.

3 And he said unto them: Blessed are ye because ye desired this thing
of me; therefore, after that ye are seventy and two years old ye shall
come unto me in my kingdom; and with me ye shall find rest.

4 And when he had spoken unto them, he turned himself unto the three,
and said unto them: What will ye that I should do unto you, when I am
gone unto the Father?

5 And they sorrowed in their hearts, for they durst not speak unto
him the thing which they desired.

6 And he said unto them: Behold, I know your thoughts, and ye have
desired the thing which John, my beloved, who was with me in my
ministry, before that I was lifted up by the Jews, desired of me.

7 Therefore, more blessed are ye, for ye shall never taste of death;
but ye shall live to behold all the doings of the Father unto the
children of men, even until all things shall be fulfilled according to
the will of the Father, when I shall come in my glory with the powers
of heaven.

8 And ye shall never endure the pains of death; but when I shall come
in my glory ye shall be changed in the twinkling of an eye from
mortality to immortality; and then shall ye be blessed in the kingdom
of my Father.

In addition, from the Doctrine and Covenants Student Manual, Joseph Smith had indicated once in a church conference that John was preparing the lost 10 tribes for their return in the last days.
–
MattNov 7 '12 at 23:14

@Matt: Interesting. I hadn't heard that before. I'd guess, though, that that was in response to a question like "The Book of Mormon teaches us that John is still alive and continuing his ministry. So where is he today and what is he doing?"
–
Mason Wheeler♦Nov 7 '12 at 23:18

Here's the exact quote, from page 112 about Section 52: "During this conference [in Kirtland, OH, June 3, 1831] a significant new office was conferred upon a number of the brethren, that of high priest in the Melchizedek Priesthood. The Prophet Joseph Smith received the spirit of prophecy and prophesied that John the Revelator was among the ten tribes preparing them to return from their long dispersion. (See History of the Church, 1:175–76)."
–
MattNov 7 '12 at 23:56

1

Any comments on where the Apostle is supposed to be today?
–
NarnianNov 8 '12 at 17:20

The Apostle John was in Indiana Jones, you know.
–
fredsbendDec 8 '14 at 21:44

Revelation given to Joseph Smith the Prophet and Oliver Cowdery, at Harmony, Pennsylvania, April 1829, when they inquired through the Urim and Thummim as to whether John, the beloved disciple, tarried in the flesh or had died. The revelation is a translated version of the record made on parchment by John and hidden up by himself.

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.

4 And for this cause the Lord said unto Peter: If
I will that he tarry till I come, what is that to thee? For he desired
of me that he might bring souls unto me, but thou desiredst that thou
mightest speedily come unto me in my kingdom.

5 I say unto thee,
Peter, this was a good desire; but my beloved has desired that he
might do more, or a greater work yet among men than what he has before
done.

6 Yea, he has undertaken a greater work; therefore I will make
him as flaming fire and a ministering angel; he shall minister for
those who shall be heirs of salvation who dwell on the earth.

7 And I
will make thee to minister for him and for thy brother James; and unto
you three I will give this power and the keys of this ministry until I
come.

8 Verily I say unto you, ye shall both have according to your
desires, for ye both joy in that which ye have desired.