Of the Apostles, John was possibly the most concerned with the Spiritual aspects of the Kingdom of God. Most of Johns writings (John, 1st, 2nd, and 3rd John) are all primarily dedicated to exposing the Deity of Jesus and that The Kingdom of God is totally Spiritual. And with this in mind let us analyze Some Scripture starting with the Scriptures you quote.
All Scripture is quoted from the New King James version, unless otherwise noted.
1st. John 4:1 through 3: 1 Beloved, do not believe every spirit, but test the spirits, whether they are of God; because many false prophets have gone out into the world. 2 By this you know the Spirit of God: Every spirit that confesses that Jesus Christ has come in the flesh is of God, 3 and every spirit that does not confess that Jesus Christ has come in the flesh is not of God. And this is the spirit of the Antichrist, which you have heard was coming, and is now already in the world.
John had on more than one occasion seen Jesus evict evil Spirits which were controlling the person they inhabited one example:
Luke 8:27 through 30 And when He stepped out on the land, there met Him a certain man from the city who had demons for a long time. And he wore no clothes, nor did he live in a house but in the tombs. 28 When he saw Jesus, he cried out, fell down before Him, and with a loud voice said, "What have I to do with You, Jesus, Son of the Most High God? I beg You, do not torment me!" 29 For He had commanded the unclean spirit to come out of the man. For it had often seized him, and he was kept under guard, bound with chains and shackles; and he broke the bonds and was driven by the demon into the wilderness. 30 Jesus asked him, saying, "What is your name?" And he said, "Legion," because many demons had entered him.
So John was well aware that people could be taken over by evil spirits. John was also present at Pentecost and was well aware that The Holy Spirit, inhabited people in the same manner.
Beloved, do not believe every spirit, but test the spirits, whether they are of God; because many false prophets have gone out into the world.
By this you know the Spirit of God: Every spirit that confesses that Jesus Christ has come in the flesh is of God. and every spirit that does not confess that Jesus Christ has come in the flesh is not of God. And this is the spirit of the Antichrist, which you have heard was coming, and is now already in the world.
Jesus himself warned us that we would be attacked by evil Spirits.
Matthew 24:4 and 5 And Jesus answered and said to them: "Take heed that no one deceives you. 5 For many will come in My name, saying, 'I am the Christ,' and will deceive many.
Other than Jesus no one has taught more about The Kingdom of God being a Spiritual entity than John.