Any juvenile who is 16 years of age or older and who has resided in the same county in North Carolina or on federal territory within the boundaries of North Carolina for six months next preceding the filing of the petition may petition the court in that county for a judicial decree of emancipation.