Energy distribution controlled ballistic Josephson junction