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 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. Its doesn't stop being categorized as a prepositional phrase just because it is categorized as "adverbial".
Other systems of terminology may use another term like "verb phrase adjunct" to refer to this function.