The gerund phrase, the direct object of the verb requires is "getting your hair cut to a short, safe length."
A gerund is a verb that is employed as a noun. The gerund ends with /-ing/. In this sentence, the gerund is "getting". The gerund phrase is "getting your hair cut to a short, safe length".
A direct object is the recipient of the main verb's action. and it only comes after an action verb and never after a linking verb.