Military base, killed soldier and sadistic officer - mysterious episode

Again, I’m looking for an old episode of TV series - I can’t find it for at least 25 years. I’m pretty sure it’s something filmed in the 80s or 90s and the action was contemporary (so any of those decades, no futuristic, wartime or 19th century vibe). I watched it between 1999-2002. I’m practically sure by now that it wasn’t a prison of any kind (although it isn’t excluded), otherwise I would have found it a long time ago, and I’ve checked all the well-known as well as lesser-known films on the subject and there isn’t a single even similar scene - except for “Shawshank Redemption” but there it looks completely different and is in the middle of the film, not at the beginning.

I don’t remember a blood, so perhaps it was “censored” version and I’m almost sure that it was TV series in style “JAG” or “Walker, Texas Ranger”. I remember only specific scene, where two men were in tough military unit. One of them was a well-built, tall guy, rather blond with long hair (someone like Jeff Daniells or Woody Harrelson). Perhaps, they are brothers or only buddies. The main character (or supporting character) also ended up in this unit (a friend of dead inmate/soldier was very similar to Ray Liotta or Tony Danza from low-budget movie “Doing Life” (1986)). With his own eyes, he sees an officer say to a long-haired blond man: “You’re free, so you can go now,” and lets him go as if on leave. The blond man walks calmly but confidently through the long corridor (maybe he even went through some kind of door, the kind with a photocell). **The officer then treacherously shoots the unsuspecting prisoner in the back (it was sudden and lethal shot in the back). The blond man was killed, and the main character is terrified. The cruel officer says to him: “You’ll get tired.” or “You will suffer”.

Rejected:
1. Cool Hand Luke (1967)
2. Papillon (1973)
3. Escape from Alcatraz (1979)
4. Brubaker (1980)
5. Bad Boys (1983)
6. Six Against the Rock (TV Movie 1987)
7. Tango & Cash (1989)
8. An Innocent Man (1989)
9. Lock Up (1989)
10. Hardcase and Fist (1989)
11. Death Warrant (1990)
12. American Me (1992)
13. Live by the Fist (1993)[b]
14.The Shawshank Redemption (1994) - however here is very similar scene (shot in a back by a prison guard)
15. Against the Wall (1994)
16. Murder in the First (1995)
17. The Last Castle (2001) - however here is similar scene(shot in a back by a prison guard)
18. 13 Dead Men (2003)