Plead guilty and confess, are not the same.
To plead guilty in a criminal court case means that you accept the charges made against you.
To confess to something means that you say that you have done something, whether that something is good or bad, legal or illegal. You can confess to a legal charge without pleading guilty, because your confession may not agree with the charge.
Example....
John confessed to the charge of driving without a seatbelt. But he refused to plead guilty because he was driving on private property, and therefore the law didn't apply.