A U.S. Army veteran has been charged with sharing classified information about an elite commando unit with a journalist.