I am not sure the Navy still has the program but in the late 1960’s a friend of my enlisted for four years. After about a year he was sent to Purdue University to study nuclear engineering. During the time he earned rank and all of his expenses were paid for. After graduation he was commissioned as an ensign. I don’t recall if he served on nuclear subs or ships but he stayed in for fifteen more years and retired after 20 years.
I know they had a BOOST program in the 80s, my best friend enlisted and they were paying for his engineering school while we were in college.