Nikolai would (apologies about the harshness of this statement) have more than likely outlived Alexei, because of the nature of Alexei's medical condition, (which was a State secret).
Alexei's illness was not a state secret. The main Alexander Palace website contains a newspaper article from 1912 reporting the history of hemophilia in Victoria's progeny and specifically mentioning Alexei as a sufferer. (There is a lengthy thread on this Forum discussing just how widespread the knowledge was that Alexandra was a likely carrier even before her marriage and how common was the knowledge -- at least among the elite classes inside and outside of Russia -- of Alexei's hemophilia.)
I have no idea how the notion came about that Alexei's illness was a closely-guarded secret at the time, although the notion is certainly widely accepted these days. My only guess is that no one dared speak openly about the illness during Nicholas' reign, because of his and Alexandra's determination to treat Alexei as heir -- and that reticence has subsequently been taken as lack of awareness.