You pray for God’s will to be done.
People live inside of time. We’re limited by our senses. So we don’t know how overcoming obstacles contribute to our growth. If we look at all the great saints— none of them had easy lives that involved bon bons and surrounded by a gushing fan club telling them how awesome they are.

They had enormous difficulties to overcome. And they were able to take those obstacles-- and turn it to spiritual profit, so that they became giants, even if, in life, they were humble and obscure and no one paid attention to them.
So none of us knows how much time God has given to us to do his work. And that’s the important thing— to be able to accomplish the stuff we’ve been set down, in this particular place, at this particular point in history, to be able to do. Asking for less time to do it would be shortsighted and foolish, and would be focusing on allowing our troubles to overcome us, rather than asking for the graces we need to handle the troubles God allows us.
If we shorten our lives ourselves, we’re held accountable for the good works that we should have accomplished— but were left undone.
So, the correct prayer would be more along the lines of, “Dear God, please give me the graces you most want to give me, and help me be the person you created me to be” or “Thy will be done” or “Please help me learn what you want me to learn, so I can grow into the person you wish to shape me into.” The greatest saints didn’t allow adversity to crush them— but they united their sufferings with Christ’s, to give them value.
But if you know someone who is actively wishing for death to come soon, that suggests, “Hm. This person is in trouble. Here I am in this time and place. What can I do to show caritas towards this suffering person? Christ has no hands on earth but ours-- so what should I actively do to show this person Christian kindness?” Whether or not your overtures are accepted/cultivated/grow into something good is between them and God— but even the smallest gesture of kindness, done for love of God, is a meritorious act of a magnitude that you can’t appreciate in this life.