A former State Highway Patrol trooper pleaded guilty Monday to two counts of willful failure to discharge his duties in the April 2018 beating of a Raleigh man.