Older movie, maybe a show about purgatory

My brain is hurting! I have the scene of an old show or movie stuck in my head. It’s a vague recollection of a handful of people on a ship or in a building that are actually dead, though they don’t realize it at first, and they accept their individual fates after being judged…I think. I thought it might be a Twilight Zone episode, but a Google search didn’t turn up anything. This one is driving me nuts!

Dead Run from 1980s version of Twilight Zone?

It sounds to me like Between Two Worlds (1944).

I don’t know if by saying “old” you mean black and white.