The story was approaching its end.

Literal

Story [topic-は] ending [target-に] approached.

結末に近づいた — 結末 (ending/conclusion) with に近づく (to approach). A narrative sentence about a story reaching its climax.