A man was sentenced to nearly four decades in prison in connection with a fatal 2024 shooting, the Bexar County District Attorney’s Office said in a news release.