While John expresses not to love the world; he is pulling the audiences mind to not just think on things of the world and live by the flesh. But to look to the heavenly, and look towards the spirit.
All us have to live in this world, family, friends, enemies are also part of it. But true family is the family of believers who seek for God, and they also have a family of believers in heaven.
Sure you may have mom or dad, sister or brother… however your dad is not your true dad, that is your Father in heaven the living God, and our fellowship is with Him and his Son, who is the King of Kings.