Nonsolvable groups with four character codegrees