Any person sentenced to pay a fine shall be ordered to be imprisoned until sentence is performed, or he or she is otherwise legally discharged, in the county correctional facility in which the crime was committed. This section shall not be construed as authorizing the confinement of any juvenile under the age of 17 years in a county correctional facility for the nonpayment of a fine.