Man gets 2 years as accomplice in deputy shooting