They all seem a little wrong to me. The word 'past' is a problem. It suggests a period of time that ends at the moment the sentence is uttered, i.e., present time.
You need this:
He doesn't know (that) I've been gone for the past few hours.
In the past I think it's more sensible to remove 'past':
He didn't know (that) I had been gone for a few hours.