Obi-Wan and Luke died the same way. They didn’t die of wounds. They transformed with peace and purpose.
Kenobi didn’t die by Vader’s blade. He transformed into the force just before he was struck. When he lifted his saber refusing to fight, his mission was complete. The force took him.
When Luke faced his fears, apologized to Leia and Ben, and distracted the First Order long enough, his mission was complete. The force took him.
No pain. Just two old flawed Jedi that finished their missions.