It uses a gerund because it is a gerund clause, modifying the whole sentence. If you used a finite verb, this would be an independent clause, and would need either to be a separate sentence, or be linked with a suitable conjunction.
Ending is a noun which is derived from a gerund, but it does not mean "an act of ending" as a gerund would. It means "the ...
The first type of noun is the result of the second type of noun.
The gerund is a verb acting as a noun & its product is the state of being of that first type.
I produced a sentence. That producing resulted in a production.
As usual with question of this sort, the answer is 100% to do with the (unpredictable) properties of the particular word that governs the clause.
It happens that unaccusative verb prove (meaning turn out, be found to be) takes:
an adjectival complement, eg The mold on the plants proved benign.
a to-infinitve clause, eg The mold on the plants proved to ...
Not every word ending in "ing" is a gerund, even when functioning as a noun. The existence of a plural is a good sign that the word isn't a gerund, but a full noun:
Three buildings are located on the site (Building is a noun)
Building a house is a lot of work (building is a gerund)
The example in comments is similar. A "newspaper cutting" is a noun,...
Your question is about which prepositions that the word guide (meaning written instructions) licenses for the prepositional phrases that act as a complement. The overwhelming choice is to. The google finds 19.6M hits on "definitive guide"; 18.2M of those are for "definitive guide to." That's better than 90% for the to case, a large percentage even allowing ...