The Guardian (2006)

A high school swim champion with a troubled past enrolls in the U.S. Coast Guard’s ‘A’ School, where legendary rescue swimmer, Ben Randall teaches him some hard lessons about loss, love, and self-sacrifice.

https://www.themoviedb.org/movie/4643-the-guardian?language=en-US