I write from a Trinitarian perspective.
It may sound as if the two terms "kingdom of heaven" and "kingdom of God" refer to slightly different things. For instance, it is sometimes offered that, perhaps, where "heaven" is used it has a slightly more heavenly, forward-looking meaning.
But the two terms are synonymous terms, they refer to exactly the same thing.
This can be seen :-
1. In Matthew 19:23,24 :-
23 Then said Jesus unto his disciples, Verily I say unto you, That a rich man shall hardly enter into the kingdom of heaven.
24 And again I say unto you, It is easier for a camel to go through the eye of a needle, than for a rich man to enter into the kingdom of God.
The terms here are being used interchangably.
2. In the use of "kingdom of heaven" in Matthew's Gospel, where the same parable/passage in Mark or Luke uses the term "kingdom of God". This is true in the following passages (quotes from King James Version):-
a) Matthew 11:11 compare with Luke 7:28
Verily I say unto you, Among them that are born of women there hath not risen a greater than John the Baptist: notwithstanding he that is least in the kingdom of heaven is greater than he. (Matt 11:11)
b) Matt 13:11 ... compare with Mark 4:11 and Luke 8:10
He answered and said unto them, Because it is given unto you to know the mysteries of the kingdom of heaven, but to them it is not given. (Matt 13:11)
c) Matt 13:24 ... compare with Mark 4:26
Another parable put he forth unto them, saying, The kingdom of heaven is likened unto a man which sowed good seed in his field: (Matt 13:24)
d) Matt 13:31 ... compare with Mark 4:30 and Luke 13:18
Another parable put he forth unto them, saying, The kingdom of heaven is like to a grain of mustard seed, which a man took, and sowed in his field: (Matt 13:31)
e) Matt 13:33 ... Luke 13:20
Another parable spake he unto them; The kingdom of heaven is like unto leaven, which a woman took, and hid in three measures of meal, till the whole was leavened. (Matt 13:33)
f) Matt 18:3 ... Mark 10:14 and Luke 18:16
And said, Verily I say unto you, Except ye be converted, and become as little children, ye shall not enter into the kingdom of heaven. (Matt 18:3)
g) Matt 22:2 ... Luke 13:29
The kingdom of heaven is like unto a certain king, which made a marriage for his son, (Matt 22:2)
3. In the origin of the terms. As the JW's Watchtower says, the terms come from Daniel 2:44 :-
And in the days of these kings shall the God of heaven set up a kingdom, which shall never be destroyed: and the kingdom shall not be left to other people, but it shall break in pieces and consume all these kingdoms, and it shall stand for ever.
The one who shall set up this kingdom is "the God of heaven" (Daniel 2:44):
So from Daniel 2:44 it follows that the full name of this kingdom is
"the Kingdom of the God of Heaven".
Since Jesus spoke in Aramaic, and the New Testament we have is in Greek we do not know exactly which term Jesus himself preferred. (Because his ministry was to the Jews it is possible he preferred to use the term "kingdom of heaven".)
4. In that only Matthew's Gospel uses the term "kingdom of heaven". If the two terms have differing intended meanings then it is very strange that "kingdom of heaven" should only be found in Matthew's Gospel.
On the other hand not only in Mark and Luke but throughout the whole of the New Testament the term "kingdom of God" is used (eg John 3:3; John 3:5; Romans 14:17, 1 Corinthians 4:20).
Why were the different terms used?
The most common and likely offered reason for the use of a different term in Matthew is that Matthew's Gospel was originally written for a specific target group, that is the Jews, whereas Luke and Mark were written for the Gentiles.
That Matthew's Gospel was first written for the Jews is the testimony of the early church:
Around 180 Irenaeus of Lyons wrote
Matthew also issued a written Gospel among the Hebrews in their own dialect, while Peter and Paul were preaching in Rome and laying the foundation of the Church. After their departure, Mark, the disciple and interpreter of Peter, did also hand down to us in writing what had been preached by Peter. Luke also, the companion of Paul, recorded in a book the Gospel preached by him. Afterwards John, the disciple of the Lord, who also had leaned upon his breast, did himself publish a Gospel during his residence at Ephesus in Asia. (Against Heresies 3:1:1)
Fifty years earlier Papias, bishop of Hieropolis in Asia Minor, wrote, “Matthew compiled the sayings [of the Lord] in the Aramaic language, and everyone translated them as well as he could” (Explanation of the Sayings of the Lord [cited by Eusebius in History of the Church 3:39]). ( https://www.catholic.com/qa/was-matthews-gospel-first-written-in-aramaic-or-hebrew )
Furthermore, Matthew is at pains to show that Jesus is the Messiah of the Old Testament. (Obviously this would be of importance to the Jews.)
The Hebrew Scriptures - or Christian Old Testament - permeate Matthew's Gospel. Approximately fifty-five references prove close enough in wording for commentators typically to label them "quotations", compared to about sixty-five for the other three canonical Gospels put together. Twelve times Matthew speaks explicitly of a passage of [OT] Scripture being "fulfilled". .... Virtually every major theological emphasis of Matthew is reinforced with Old Testament support.
(Craig Blomberg in "Commentary on the New Testament Use of the Old Testament" by G.K. Beale and D.A. Carson, page 1)
(Thank you to William Hendriksen's Commentary on Matthew, introduction, for the 3 following thoughts):-
Also notice the following two passages are only found in Matthew's Gospel and add to the evidence Matthew was at first written for the Jews:
These twelve Jesus sent out, instructing them, “Go nowhere among the Gentiles and enter no town of the Samaritans, but go rather to the lost sheep of the house of Israel. (Matthew 10:5-6 ESV)
And behold, a Canaanite woman from that region came out and was crying, “Have mercy on me, O Lord, Son of David; my daughter is severely oppressed by a demon.” But he did not answer her a word. And his disciples came and begged him, saying, “Send her away, for she is crying out after us.” He answered, “I was sent only to the lost sheep of the house of Israel.” But she came and knelt before him, saying, “Lord, help me.” And he answered, “It is not right to take the children's bread and throw it to the dogs.” She said, “Yes, Lord, yet even the dogs eat the crumbs that fall from their masters' table.” Then Jesus answered her, “O woman, great is your faith! Be it done for you as you desire.” And her daughter was healed instantly.
Notice also that in Mark's Gospel an explanation of Jewish practice is felt necessary (because it was written for Gentiles) but the parallel passage in Matthew's Gospel has no such explanation (because its Jewish readers would not have needed it). The explanation is missing before Matthew 15:2.
Now when the Pharisees gathered to him, with some of the scribes who had come from Jerusalem, 2 they saw that some of his disciples ate with hands that were defiled, that is, unwashed. 3 (For the Pharisees and all the Jews do not eat unless they wash their hands properly, holding to the tradition of the elders, 4 and when they come from the marketplace, they do not eat unless they wash. And there are many other traditions that they observe, such as the washing of cups and pots and copper vessels and dining couches.) 5 And the Pharisees and the scribes asked him, “Why do your disciples not walk according to the tradition of the elders, but eat with defiled hands?” (Mark 7:1-5)
So, why does Matthew's Gospel use "kingdom of heaven" but the rest of the NT use "kingdom of God"?
The most likely offered reason is that the Jews at that time had an excessive fear of using God's name for fear of dishonouring him.
They feared to break the commandment "Thou shalt not take the name of the LORD thy God in vain." The Jews extended this to even using the word "God".
Hence, not because they were correct, but for fear of offending them and to avoid creating an unnecessary barrier to their reception of the Gospel, "the kingdom of heaven" is used in Matthew's Gospel.
On the other hand for the Gentiles the term "the kingdom of God" is preferred because "the kingdom of heaven" sounds as if it is referring rather to the next world than both this world and the next. And the kingdom is not just a future kingdom but a kingdom in this world which started in the New Testament era.
For evidence that the kingdom begins here on earth (and began at the start of the NT era with the preaching of John the Baptist) see the following verses Daniel 2:44, Matthew 11:12, Matthew 21:31-32, Mark 1:15, Luke 10:9-11, Luke 11:20, Luke 16:16, Luke 17:20-21 (compare this with John 3:5 and Romans 14:17), John 18:36.
(I give credit to www.gotquestions.org - "What is the difference between the kingdom of God and the kingdom of heaven?" for helping in producing this answer.)