Takeovers of this kind often involve "trigger events." There was no trigger event for the Spanish takeover of Portugal during Ferdinand of Aragon's time, and there was one late in the 16th century, when Portugal was taken over.
In 1580, the direct line to the throne of Portugal died out (the trigger event). There were a number of "cousins" to the royal family, one of which was Philip V of Spain. It was in this "role" that he took over Portugal, not on behalf of Spain, but under a "personal union," whereby he was king of Spain and Portugal.
In Ferdinand of Aragon's time, on the other hand, the Portuguese royal family was intact. Also, Ferdinand, as king of Aragon, was actually more interested in events to his east, that is, regarding the balance of power in Italy, where both France and Spain had interests. Portugal was a poorer, less populous country by comparison, meaning that it was not as high on the list of Ferdinand's priorities. His interest in Grenada was partly because of his wife Isabella, partly because unlike Portugal, it was occupied by Moors (and Jews), rather than fellow Catholics.
Leon and Castile had been united much earlier in 1301, not in Ferdinand's time, although he did have a part in bringing the Spanish-speaking (but not French-speaking) part of Navarre into Spain.