にいたんだ

was at/in

→ に
phrase Rare #21,788
was at/in A casual way to state or explain where someone was. んだ adds an explanatory or emphatic tone.
JA: 彼は昨日、学校にいたんだ。
EN: He was at school yesterday.

ちょうどボストンにいたんだ。

I was actually in Boston.

トムってボストンにいたんだと思うよ。

I think Tom was in Boston.

映画館にいたんだ。

I was at the movie theater.

探していた男がビルの中にいたんだ

The man I was looking for was inside the building.

— M - Eine Stadt sucht einen Mörder (1931)

一体どこにいたんだ?

Where on earth have you been?

— オープン・ユア・アイズ (1997)

その時、僕たちはたまたまボストンにいたんだ。

We happened to be in Boston at the time.

昨日は東京にいたんだ。

I was in Tokyo yesterday.

ボストンにいたんだ。

I was in Boston.

トムはどこにいたんだ?

Where was Tom?