17 But thanks be to God that, though you used to be slaves to sin, you have come to obey from your heart the pattern of teaching that has now claimed your allegiance.

Read Romans 6:17 Using Other Translations

But God be thanked, that ye were the servants of sin, but ye have obeyed from the heart that form of doctrine which was delivered you.
But thanks be to God, that you who were once slaves of sin have become obedient from the heart to the standard of teaching to which you were committed,
Thank God! Once you were slaves of sin, but now you wholeheartedly obey this teaching we have given you.