Ukraine had no choice. They were Russian nukes, and not giving them back would have probably triggered a war immediately. But with Ukraine drowning in pro-Russian influence at the time, there is no chance they would have defied Russia.
They had a choice, they just chose the one that didn't lead to war.