I am not sure anyone had to die - least of all Data, but in the event there had to be, the best choice would have been Picard and the reasons would have to be solid. The Federation would have had to be in a better position/place if Picard bit the big one. Then, of course, as mentioned below, Riker could have been offered command.