You are misunderstanding the quote. A man, a Jew, asked Jesus, another Jew, what "command" he should obey, since Jesus was clearly preaching beyond religious obedience and the man was confused. So in reply TO THIS MAN, Jesus said "I give you only one "command", to love God with all your heart, and your brothers as yourself". Hopefully, the man understood.
Jesus only used the term "command" because that's what the man was asking for. Jesus understood that the man couldn't grasp the concept of living by the spirit of love, because he had lived his whole life steeped in religious dogma, laws, and rules. The man couldn't comprehend how to live without the idea of some "divine command". So Jesus responded to the man, kindly, and gave him his "command".
But what Jesus told the man to do; to love, can't really be done as obedience to a command. It has to be done as a voluntary expression of the spirit.
Many here on TOL are like that man. They cannot conceive of a relationship with God that is not based on religion, and on obedience to religious dogmas and rules and laws. Sadly, they can't understand that love is not a form of obedience. And so they go around preaching obedience to their religion, and their religious laws, obsessively, think that this is obedience to and love of God. But are just blend men trying to lead other blind men into the dark. Because Jesus' message was a message of the spirit. Not a message of religious authority, dogmas, or laws.
Matthew 22:34-40 NASB - 34 But when the Pharisees heard that Jesus had silenced the Sadducees, they gathered themselves together. 35 One of them, a lawyer, asked Him a question, testing Him, 36 "Teacher, which is the great commandment in the Law?" 37 And He said to him, " 'YOU SHALL LOVE THE LORD YOUR GOD WITH ALL YOUR HEART, AND WITH ALL YOUR SOUL, AND WITH ALL YOUR MIND.' 38 "This is the great and foremost commandment. 39 "The second is like it, 'YOU SHALL LOVE YOUR NEIGHBOR AS YOURSELF.' 40 "On these two commandments depend the whole Law and the Prophets."
Mark 12:28-34 NASB - 28 One of the scribes came and heard them arguing, and recognizing that He had answered them well, asked Him, "What commandment is the foremost of all?" 29 Jesus answered, "The foremost is, 'HEAR, O ISRAEL! THE LORD OUR GOD IS ONE LORD; 30 AND YOU SHALL LOVE THE LORD YOUR GOD WITH ALL YOUR HEART, AND WITH ALL YOUR SOUL, AND WITH ALL YOUR MIND, AND WITH ALL YOUR STRENGTH.' 31 "The second is this, 'YOU SHALL LOVE YOUR NEIGHBOR AS YOURSELF.' There is no other commandment greater than these." 32 The scribe said to Him, "Right, Teacher; You have truly stated that HE IS ONE, AND THERE IS NO ONE ELSE BESIDES HIM; 33 AND TO LOVE HIM WITH ALL THE HEART AND WITH ALL THE UNDERSTANDING AND WITH ALL THE STRENGTH, AND TO LOVE ONE'S NEIGHBOR AS HIMSELF, is much more than all burnt offerings and sacrifices." 34 When Jesus saw that he had answered intelligently, He said to him, "You are not far from the kingdom of God." After that, no one would venture to ask Him any more questions.
Luke 10:25-37 NASB - 25 And a lawyer stood up and put Him to the test, saying, "Teacher, what shall I do to inherit eternal life?" 26 And He said to him, "What is written in the Law? How does it read to you?" 27 And he answered, "YOU SHALL LOVE THE LORD YOUR GOD WITH ALL YOUR HEART, AND WITH ALL YOUR SOUL, AND WITH ALL YOUR STRENGTH, AND WITH ALL YOUR MIND; AND YOUR NEIGHBOR AS YOURSELF." 28 And He said to him, "You have answered correctly; DO THIS AND YOU WILL LIVE." 29 But wishing to justify himself, he said to Jesus, "And who is my neighbor?" 30 Jesus replied and said, "A man was going down from Jerusalem to Jericho, and fell among robbers, and they stripped him and beat him, and went away leaving him half dead. 31 "And by chance a priest was going down on that road, and when he saw him, he passed by on the other side. 32 "Likewise a Levite also, when he came to the place and saw him, passed by on the other side. 33 "But a Samaritan, who was on a journey, came upon him; and when he saw him, he felt compassion, 34 and came to him and bandaged up his wounds, pouring oil and wine on them; and he put him on his own beast, and brought him to an inn and took care of him. 35 "On the next day he took out two denarii and gave them to the innkeeper and said, 'Take care of him; and whatever more you spend, when I return I will repay you.' 36 "Which of these three do you think proved to be a neighbor to the man who fell into the robbers' hands?" 37 And he said, "The one who showed mercy toward him." Then Jesus said to him, "Go and do the same."