How can John I of Castile win the Portuguese Throne

As the title suggests, John I de Trastamara was one of the claimants, (the other being John I de Aviz) over the Throne of Portugal after the death of the last Burgundian King of Portugal, Ferdinand I. Historically, the Aviz won, but how and what could Trastamara have done differently to defeat his rival for the throne?
 
Honestly, disposing of him in an underhand way would have been his best bet. Without a strong native candidate the Portuguese would have had to reluctantly embrace a temporary reunion with Castille.
 
Top