1 The elder,
To the lady chosen by God and to her children, whom I love in the truth—and not I only, but also all who know the truth— 2 because of the truth, which lives in us and will be with us forever:
3 Grace, mercy and peace from God the Father and from Jesus Christ, the Father’s Son, will be with us in truth and love.
4 It has given me great joy to find some of your children walking in the truth, just as the Father commanded us. 5 And now, dear lady, I am not writing you a new command but one we have had from the beginning. I ask that we love one another. 6 And this is love: that we walk in obedience to his commands. As you have heard from the beginning, his command is that you walk in love.
7 I say this because many deceivers, who do not acknowledge Jesus Christ as coming in the flesh, have gone out into the world. Any such person is the deceiver and the antichrist. 8 Watch out that you do not lose what we[a] have worked for, but that you may be rewarded fully. 9 Anyone who runs ahead and does not continue in the teaching of Christ does not have God; whoever continues in the teaching has both the Father and the Son. 10 If anyone comes to you and does not bring this teaching, do not take them into your house or welcome them. 11 Anyone who welcomes them shares in their wicked work.
12 I have much to write to you, but I do not want to use paper and ink. Instead, I hope to visit you and talk with you face to face, so that our joy may be complete.
13 The children of your sister, who is chosen by God, send their greetings.
The focus of 2 John is similar to 1 John. The purpose is to warn the early believers of false teachers who were distorting the gospel and saying Jesus only "seemed to be human". These believers are apparently connected to an "elect Lady and her children". Most commentators believe this was a literal figure, though we don't know her name. She could have been a house church leader, as their were other women leaders in the early church. I.e. Lydia in Philippi.
But again the point is to confront these false teachers. The major heresy was called "Gnosticism", which continued to be the major heresy the church faced in the first century, but this specific heresy was called "docetism". Here is a brief definition of "docetism".
In Christian terminology, docetism (from the Greek δοκεῖν/δόκησις dokeĩn (to seem) /dókēsis (apparition, phantom), according to Norbert Brox, is defined narrowly as "the doctrine according to which the phenomenon of Christ, his historical and bodily existence, and thus above all the human form of Jesus, was altogether mere semblance without any true reality."  Broadly it is taken as the belief that Jesus only seemed to be human, and that his human form was an illusion. The word Δοκηταί Dokētaí (illusionists) referring to early groups who denied Jesus' humanity, first occurred in a letter by Bishop Serapion of Antioch (197–203), who discovered the doctrine in the Gospel of Peter, during a pastoral visit to a Christian community using it in Rhosus, and later condemned it as a forgery. It appears to have arisen over theological contentions concerning the meaning, figurative or literal, of a sentence from the Gospel of John: "the Word was made Flesh".
Docetism was unequivocally rejected at the First Council of Nicaea in 325 and is regarded as heretical by the Catholic Church, Orthodox Church, and Coptic Church.
The main problem is that they were using this doctrine to keep on sinning. John says again love is shown in obedience to God's commands, not disobedience. And the main area of obedience is to love one another. This is the proof for John that we are walking with Christ. This was the teaching of Jesus, and John says anyone who runs ahead of this teaching is an anti-Christ, because he or she is contradicting what Jesus taught.
The key thing I think is that we learn from is early church and avoid the same errors they were tempted with. Today we call this heresy "cheap grace". Meaning we cheapen the grace God has given us, if we use it as a rationalization to sin. The opposite issue is legalism, which makes the Christian life all about rules, and spirituality is tied to outward evidences of piety. That is why John indicates the clearest form of obedience is to love on another. This by the way is what the bible says will draw people to Christ. As we love others outside the church with the same love we have received, people will be drawn to His bride the church. The is what the Christian life is all about and it's most important evidence of true teaching.