In John 18:36, Jesus did not quite say, “My kingdom is not of this world.” He said, “the kingdom”. Indeed, he said something very close to the opposite.
He did not claim the kingdom as his own. He did not say that it didn’t belong to this world. In addition, the words translated as “kingdom” and “world” do not quite mean what we usually mean by the English words.
The Greek is:
A detailed literal translation: The realm, the one relating to me, is not really beyond the world order, the familiar one.
You can see each of the Greek words defined and parsed by going to this article on John 18:36.
The key word is the Greek preposition translated as “of” (ek ἐκ ) which means "out of", "from", "by", "away from” when it refers to motion. It does not refer to motion here. When in refers to place, it means "beyond", and "outside of". It has other meanings as well, but they don’t apply here.
The word translated as "kingdom" can be the region, the reign, the castle or the authority of a ruler. Christ does not seem to use it to mean a physical region, so its translation as "reign" or "realm" seems more appropriate. This is especially true because the "reign" of a king means the execution of his will.
Christ uses the word translated as "the world" to mean "the world order," specifically the powers-that-be. More about this word in this article about related words.