There are many different systems for describing grammar, so many concepts can be described with various terms depending on which system of terminology you're using. Sometimes it is more useful to refer to the components of a phrase, and sometimes it is more useful to refer to its function, so many systems tend to have labels for both composition and function.
"In the river" is classified as a prepositional phrase, regardless of its function, in all systems of terminology that I am familiar with. The label "prepositional phrase" corresponds to the categorization of the word in as a preposition.
Some systems of terminology use the term "adverbial" to categorize the function of a phrase. In these systems, "in the river" in the sentence "They swam in the river" would be both adverbial in function, and a prepositional phrase in form. ItsIt doesn't stop being categorized as a prepositional phrase just because it is categorized as "adverbial". For further information on the meaning of "adverbial" and how it differs from "adverb", see the answers to this Linguistics SE question: Is the adverbial phrase and adverb phrase identical?
Other systems of terminology may refer to this function with another term like "verb phrase adjunct". Whatever you call it, an "adverbial phrase" is not the same kind of category as a "prepositional phrase", so it doesn't make sense to ask whether a phrase is one or the other: it might be both.