This verse is to the church and the saints therein.
"From hence it is concluded,
[1] that Christ stands and knocks at the hearts of unregenerate sinners by the ministry of the word, and that they have sufficient grace and strength to open their hearts unto him, or else he knocks in vain; for
what wise man would stand at another's door and knock, if he knew there were not any within that could open to him?...
These words are not spoken to nor of unregenerate sinners, nor have they any reference to the opening of men's hearts in conversion, but are directed to the angel of the church of the Laodiceans, and to the members of that church, persons that professed the name of Christ;
Who, though they were not hot, yet were not cold, and for whom Christ had a regard, though they were in this lukewarm state; and, therefore, takes every proper method to bring them out of it;...
This church was in a sleepy, lukewarm, indifferent, secure frame of spirit, as appears from (vv. 15-18). Christ will not suffer her to continue so, and, therefore, takes his rod in his hand, stands at her door, and gives some severe knocks and raps to bring her to herself, and out of this indolent, supine, and self-confident state and condition she was in;
which sense is confirmed by the preceding verse, as many as I love, I rebuke and chasten be zealous,
therefore,
and repent" (From John Gill, The Cause of God and Truth http://www.pbministries.org/books/gill/Cause_of_God_and_Truth/Part 1/section_60.htm )
Also notice Brother Bob Hope in the preceding verse you quoted Jesus said to that church, "19 As many as I love, I rebuke
and chasten: be zealous therefore, and repent". Apparently the people He was knocking on the door to in the following verse are those He also chastens which means they were already children of God because scripture tells us elsewhere, "7
If ye endure chastening, God dealeth with you as with sons; for what son is he whom the father chasteneth not?8
But if ye be without chastisement, whereof all are partakers,
then are ye bastards, and not sons" (Hebrews 12:7-8)