How did this teleportation happen in DN 16?
Piya Tan's translation and commentary of DN 16 has two footnotes:


The various texts differ regarding the details of the Buddha‘s crossing the Ganges. They however agree that he
uses his psychic power to teleport himself and the order across the river. The redactors added this episode despite
the Vinaya rule against the public display of psychic powers (Pāc 8 = V 4:25): see Kevaḍḍha S (D 11) = SD 1.7
Intro (3.3). The Pali texts apparently regard the episode as ―symbolic of the Buddha‘s attainment of the  ̳other side‘
of transmigration, ie extinction (nirvana), by the power of meditation‖ (Warder 1970:71).

According to the Sarvastivada account, only the Buddha crosses the Ganges by his own power. The monks
swim across while other disciples build a raft (Waldschmidt 1950-51:158). The imagery here is obvious: the Buddha
has crossed the ocean of suffering; his immediate disciples, the monks, crosses the river of suffering using their own
effort; and the lay disciples are working at their own means of the salvation, the raft. On this verse, cf Dh 85.