I don't where you heard that story, but it's loaded with factual errors. It's an utter apologetics whitewash of a number of extremely embarrassing facts.
February 19, 1616 An Inquisition commissioned theologians to prepare a formal report on the heliocentric view of the universe.
February 24 1616 the unanimous report concluded that a stationary Sun and moving earth is "foolish and absurd in philosophy, and formally heretical since it explicitly contradicts in many places the sense of Holy Scripture ".
February 25 1616 The Pope declares an an order for Galileo to "abandon this doctrine, not to teach it to others, not to defend it, and not to treat of it", and threatens stronger action if Galileo did not comply.
February 26 1616 Galileo receives the order: "to abstain completely from teaching or defending this doctrine and opinion or from discussing it... to abandon completely... the opinion that the sun stands still at the center of the world and the earth moves, and henceforth not to hold, teach, or defend it in any way whatever, either orally or in writing".
March 5 1616 The Pope ordered a complete ban on any book advocating the moving Earth model on the basis that it was "altogether contrary to Holy Scripture". This ban was not limited to Galileo's work, but also included Kepler's work, Copernicus's work, and any such work in general.
Next we jump ahead to 1632, two Popes later. Galileo has a good relationship with the new Pope. Galileo wants to write a new book, and the Pope demands that his geocentric arguments be included. So apparently the Pope knew of and consented to a new book. The Pope's garbage geocentric arguments naturally get demolished in the book, and the character who presented them came off looking foolish. The new Pope takes it personally, and orders the new book banned.
Galileo is then brought to trial "for holding as true the false doctrine taught by some that the sun is the center of the world", in violation of the 1616 order.
Galileo is threatened with torture and interrogated.
June 22 1633 The Inquisition finds Galileo guilty of Heresy for teaching that the Earth moves after a moving Earth had been explicitly declared contrary to Holy Scripture. Galileo was sentenced to prison, which was reduced to house arrest. Furthermore the Inquisition bans the publication of anything ever published by Galileo, whether it deals with the solar system or not.
January 8 1642 Galileo dies, after a 9 year life-sentence arrest.
1835 Galileo's work is finally removed from the Index Librorum Prohibitorum, after more than 200 years of being on the Church's prohibited list.
1992 Pope John Paul II finally issues a public vindication of Galileo and acknowledgement of the Church's fuckup:
"Thanks to his intuition as a brilliant physicist and by relying on different arguments, Galileo, who practically invented the experimental method, understood why only the sun could function as the centre of the world, as it was then known, that is to say, as a planetary system. The error of the theologians of the time, when they maintained the centrality of the Earth, was to think that our understanding of the physical world's structure was, in some way, imposed by the literal sense of Sacred Scripture. "
Note that "theologians of the time" refers to the official position of the Church and at least two Popes who attacked Galileo. And "they maintained the centrality of the Earth" refers to their insistence that the Earth is the center of the universe and does not move because Bible says the Earth does not move, and the Bible is the infallible word of God.
And I don't think this would really be complete without pointing out exactly why the Church declared that the Bible stated the Sun orbits a non-moving Earth. That includes, but not necessarily limited to:
Psalm 104:5 (English Standard Version)
He set the earth on its foundations, so that it should never be moved.
1 Chronicles 16:30 (English Standard Version)
tremble before him, all the earth; yes, the world is established; it shall never be moved.
Psalm 93:1 (English Standard Version)
The Lord reigns; he is robed in majesty; the Lord is robed; he has put on strength as his belt. Yes, the world is established; it shall never be moved.
Psalm 96:10 (English Standard Version)
Say among the nations, âoeThe Lord reigns! Yes, the world is established; it shall never be moved; he will judge the peoples with equity.â
And Joshua 10:12-13 (English Standard Version)
At that time Joshua spoke to the Lord in the day when the Lord gave the Amorites over to the sons of Israel, and he said in the sight of Israel,
"Sun, stand still at Gibeon, and moon, in the Valley of Aijalon."
And the sun stood still, and the moon stopped, until the nation took vengeance on their enemies.
Is this not written in the Book of Jashar? The sun stopped in the midst of heaven and did not hurry to set for about a whole day.
-