There's no rule here about "ending sentences with is/are". There is a rule about moving interrogative pronouns (wh-questions) to the front of a sentence, and sometimes that leaves the verb ("is/are" in your examples) at the end of the sentence.
In your examples, the difference is in the structures of the two noun clauses after "Do you know...".
The deep structure of the first noun clause is:
subject + verb + subject complement + adverbial
Step A) "[there] + [are] + [60 minutes] + [in 24 hours]"
The question is about "60 minutes", so we replace that section with a wh-question:
Step B) "[there] [are] [how many minutes] [in 24 hours]"
As with all interrogative pronouns, we move the wh-question to the front of the clause:
Step C) "[how many minutes] [there] [are] [in 24 hours]"
Which gives, "Do you know how many minutes there are in 24 hours?"
With the second, the deep structure is:
subject + verb + subject complement
Step A) [the distance between the Earth and the Moon] + [is] + [400,000 km]
We are asking the question about the 400,000 km, so we replace that with a wh-question:
Step B) [the distance between the Earth and the Moon] [is] [what]
Finally, we move the wh-question to the front of the clause:
Step C) [what] [the distance between the Earth and the Moon] [is]
Which gives, "Do you know what the distance between the Earth and the Moon is?"