The answer is both.
Phrases are called after the head of their constituent elements.
In In such an analysis your sample is clearly a prepositional phrase (defintiondefinition below).
If When discussing the focus is on meaningful units within the clause -- the sentence phrases -- you will read aboutthe terminology used is noun phrases, verb phrases, and their component parts (where-- where, for instance, in addition to the verb, a verb phrase may also include a prepositional phrase).
On the other hand, when looking at the syntactic functions of clause elements, the terminology used is 'subject, verb (predicator), object, complement, adverbial'.
An An adverbialadverbial (from Dictionary) is
a word or phrase functioning as an adverb
In your example "in the river" is a prepositional phrase functioning as an adverb, i.e. an adverbial.
Here's a link (there are many others) which equates prepositional phrase with adverbials or adjectivals.
Prepositional phrases (adverbials/adjectivals)
These are formed from the head, followed by a noun phrase. Examples of prepositional phrases are in the teapot, on the toilet, and round the bend. They may be called adverbials since their usual function is to qualify a verb in the same way as an adverb does. You can test this by replacing a given prepositional phrase with an adverb - for example: Fred swam in the river and Fred swam swiftly. Both of these are grammatically standard forms. They may also function as adjectives: the pirate with the wooden leg.
So your sample can be called a prepositional phrase or an adverbial depending on the terminology you are using.