JMNT(i)
17 But Grace by God (or: Now [this is] happiness granted as favor in God): that you folks were existing, continuing to be slaves of the Sin (slaves of failure; slaves belonging to the missing the target), yet now you submissively hear and pay attention, so as to obey – from out of heart! – [the] type of instruction (or: chiseled and imprinted pattern of teaching) into which you are (or: at one point were) given over (handed over and entrusted; given alongside).
18 Now, being set free (or: liberated) from the Sin (failure; error), you folks are (or: were suddenly) enslaved (made slaves) to justice (= to covenant participation in solidarity) (or: in the Way pointed out; for fair and equitable dealings; by the Well-ordered, Righteous Existence [in Christ]; to rightwised relationship and [covenantal] behavior).