。
She spotted a boat in the distance.
Literal
She [topic-は] distance [at-に] boat [object-を] found.
遠くに ('in the distance') uses に because the boat exists at that location — に is the particle for static existence and points of reference, contrasting with で (where actions happen). With 見つける ('to find'), the perceived object is at に: the boat is sitting out there, and her perception lands on it. Compare to 遠くで犬が吠える ('a dog is barking in the distance'), where で would be used because the action of barking happens there.