She was away from Japan last year.

Literal

She [topic-は] last-year Japan [from-を] had-been-away.

離れる takes を on the place left behind, in the same way 出る ('exit') and 降りる ('get off') do — the を marks the point of departure or origin of motion, not a direct object. The ~ていた form here is doing something subtle: it doesn't describe a single past leaving, but a sustained state of being away. Compare the bare past 離れた ('left, departed at a moment'), the ~ている present ('is currently away'), and ~ていた ('was [throughout that period] away'). The choice signals that the absence persisted across last year rather than happening at a point within it.