If the killing of Ravana was a part of destiny, it must be predicted by Jyotisha . Let's see if that is the case by using Shri Ram's horoscope as used by Achyutananda tradition of Puri.
In this chart, 6th house (enemies) has Rahu in Saggitarius, which shows that a prominent enemy of a Jataka shall be a Rakshasha (Rahu) with Brahmin nature (Saggitarius being the sign of Devaguru Brhaspati). This indeed was Ravana.
Manifestation of Enmity is seen from the Arudha Pada of the 6th house (A6), which is in the 8th house of the chart. Lord of Shri Ram's 8th house is Aquarius with co-lord Rahu, seated in 6th house, which is an upachaya.
Upachaya houses (3,6,10,11) are ones which are associated with some amount of freewill or scope of improvement. Because of that, Shri Ram gave Ravana innumerable chances to accept defeat and step back as he always intended to spare him, which he clearly refused. The fall of Ravana was therefore caused as the lord of A6 is debilitated in a dusthana.
This shows that Ravana's behavior and defeat were destined, as the same was indicated by the planetary placement's during Shri Ram's birth. But also note that if Ravana would have stepped back, he could have been spared.
This analysis is paradoxical, as we analyze Ravana's character by his mundanely body without consideration of his previous lifetimes. Taking a look at Bhagvata Purana, Third Canto, Chapter 50.3, we find that Ravana is actually Jaya, who's cursed by the Sanat Kumaras to be born as Shri Vishnu's enemies for 3 lifetimes, after which he and Vijaya shall be eligible to return.
This indicates that the entire plot is nothing but destiny, and a part of Vishnu's lila leading to his incarnation on the earthly plane to establish Dharma, whenever required.