First, the Nicaraguan route was 300 miles closer to the United States on the Atlantic side alone, and shaved 500 miles off the voyage to San Francisco from the Pacific side as well. Transit across Nicaragua was a major time and money saver for travelers anxious to hit the goldfields, and for the steamship operators that carried the passengers, freight and, on the return, the gold (a few days gained in depositing specie in New York and collecting interest was a serious deal).
Second, a natural transitway almost completely across Nicaragua already existed, making it possible to cross to the Pacific side with reduced muss, fuss, and capital expenditure if little comfort.
As it finally worked out, the US government paid $10 million to the new government of Panama for the canal rights, something of a bargain.
At the same time the US paid $40 million to Compagnie Nouvelle for the company's derelict and dubious rights, rights whose legal standing with Colombia--which, on top of everything else had lost sovereignty over the territory in which the concession was granted--were extremely tenuous and, as far as the newly minted government of Panama was concerned, would seem to be ripe for repudiation or renegotiation, one might think.
Not quite a bargain at $40 million. Add the $10 million paid to Panama, and the cost basis for Panama was now $5 million more, instead of less, than the Nicaragua estimate.
It was the subject of detailed studies by the Army Corps of Engineers "Nuclear Cratering Group" and Lawrence Livermore Laboratories, Oval Office palaver with Eisenhower, Kennedy, and Johnson, field research in Central America, test shots in the Nevada desert...and negotiations with an understandably wary Panamian government that resulted in a provisional treaty for the nuclear project.
Old Panama: Wikipedia
Current Panama Canal: BBC
Planned Nicaragua Canal: Havana Times