there's a resistance on the part of both of them at the prospect of dying for something bigger than themselves, because honestly that's most people's response to that prospect. if given the choice, it's a pretty human response to want to just live your life, rather than give it up. (and i could write about the freudian concepts of the life drive vs the death drive, but freud haters only in this house, so i will not.)
but that's pretty much where the similarities end.
the thing about cassian is that there is a part of him that has always been lowkey chasing to die, even as he's telling luthen it's better to live, even as he's taking his credits from aldhani and trying to run, even as he scrambles for one last ditch attempt at something after ghorman. realistically, he has never seen a future with himself in it as anything other than a pipe dream — so he becomes a willing sacrifice in the fight against the empire. when the time comes, he gathers the troops and supports jyn erso to scarif to get the death star plans. and, at the end of the day, the culmination of his arc, his "narrative reward", if you will, is that he gets to die, but he gets to do so by his own choices and on his own terms; he gets to die at peace on a beach, and he doesn't have to die alone.
(if i were to say it, we can say thanatos, the death drive.)
ryland never wanted to die. he was dragged onto a suicide mission against his will, pretty much literally kicking and screaming. as the memories start to come back to him and he's trying to find a solution to the astrophage problem, he knows that, odds are, that's what's going to happen to him, on a one-way trip to the depths of space — but even so, he keeps trying to live. he leaps at the chance that rocky gives him, to have enough fuel to get home. in his own words, in the book, he "[spends] a lot of time un-suiciding this suicide mission". and, yes, he crunches the numbers and it is a sacrifice when he goes back to save rocky, because he knows he can't both save rocky and go home, but in the face of this active choice, what is the culmination of his arc, his "narrative reward"? he gets to live, he gets to do what he loves, he gets to have his best friend by his side.
(if i were to say it, eros, the life drive.)
so, what's my thesis here? idk, it's an interesting parallel.