From both an ancient philosophical approach, and one based on human nature, this was impossible.
Some of the answers cite the Iliad to show some attempts to avert the ciry's destruction, but these were already doomed to fail. Priam decided not to give Helen back directly, and when Menelaus bested Paris in combat, the gods spirited him away.
In fact, this whole question incorrectly approaches the subject from a modern point of view -- the ancient Greeks didn't think like that. The core of their philosophy was Fatalism, or the belief that destiny (plus the whims of the gods) controlled events, and not men's actions.
The whole story of the Trojan War is imbued with the impossibility of avoiding fate. Hecuba's dream while carrying Paris, and its outcome, demonstrate this:
The first son born to her was Hector; and when a second babe was about to be born Hecuba dreamed she had brought forth a firebrand, and that the fire spread over the whole city and burned it. When Priam learned of the dream from Hecuba, he sent for his son Aesacus, for he was an interpreter of dreams, having been taught by his mother's father Merops. He declared that the child was begotten to be the ruin of his country and advised that the babe should be exposed. When the babe was born Priam gave it to a servant to take and expose on Ida; now the servant was named Agelaus. Exposed by him, the infant was nursed for five days by a bear; and, when he found it safe, he took it up, carried it away, brought it up as his own son on his farm, and named him Paris.
Pseudo-Apollodorus, Bibliotheca, 3.12.5, Tr. Sir James George Fraser
The prophecy in Hecuba's dream is fulfilled, despite everyone's attempts to avoid it. Troy's destruction was assured by Paris's survival as an infant.
After Achilles slays Hector, Hecuba makes direct reference to Fate while trying to persuade Priam from going to beg Achilles for the body:
Let us then weep Hector from afar here in our own house, for when I gave him birth the threads of overruling fate were spun for him that dogs should eat his flesh far from his parents, in the house of that terrible man on whose liver I would fain fasten and devour it.
MIT Internet Classics Archive, Iliad, book 24, 209, tr. Samuel Butler
So let's leave mythology behind and treat the characters in the Iliad as real people, or at least the heroic archetypes Homer was depicting. On a level of human nature, the destruction of Troy was also inevitable. Even if Fate wasn't controlling everything, the Greeks and Trojans couldn't help but make devisions that led to the city's destruction.
Although triggered by Paris's abduction of Helen, the Achaean expedition against Troy was a massive undertaking and they had a lot invested in it. Agamemnon in particular sacrificed his own daughter Iphiginea to gain the favorable winds necessary to get to Troy. And it's clear that Helen was secondary to pride, glory, and booty -- thus the squabble between Achilles and Agamemnon over Briseis prolonged the conflict and almost brought the Greeks to ruin.
When Patroclus convinced Achilles to let him lead the Myrmidons against the Trojans about to overrun the Greek ships, Achilles advised Patroclus to do only that and come tight back. But of course Patroclus didn't do that -- instead, wearing Achilles's armor, he went on a wild rampage in the Trojan army until Apollo knocked the helmet off, allowing Euphorbus to kill him.