Why is the word cervix "relating to the neck", not anywhere near the neck?
There are various cervices to be found in human physiology, including not just the cervix uteri alone but also such necks as the cervix vesicae urinariae, the cervix femoris, or even the cervix dentis. That’s because cervix just means “neck” (or here “narrowing”), with the remaining words in the genitive/possessive case, so you have “the neck of the uterus” — or more simply the uterus’s neck, the urinary bladder’s neck, the femur’s neck, or the tooth’s neck.
The cervical vertebrae are the top seven ones up in that neck upon which sits your head, which we number C1–C7 descending from the topmost one.
The Online Biology Dictionary says that cervix means:
neck, a term denoting the front portion of the collum or neck (the part connecting the head and trunk) or a constricted part of an organ (for example cervix uteri).
Cervix columnae posterioris medullae spinalis = cervix cornus dorsalis medullae spinalis.
Cervix cornus dorsalis medullae spinalis, neck of dorsal horn of spinal cord: the constricted portion of the dorsal horn or column, of grey matter in the spinal cord between the base of the horn and the head, also called cervix cornus posterioris medullae spinalis and neck of posterior horn of spinal cord.
Cervix dentis, the slightly constricted region of union of the crown and the root or roots of a tooth, also called collum dentis, dental neck and neck of tooth.
Cervix glandis = collum glandis penis.
Cervix mallei = collum mallei.
Cervix uteri, neck of uterus: the lower and narrow end of the uterus, between the isthmus and the ostium uteri.
(With edits for formatting and abbreviation expansion.)
It appears the term cervix was applied to other human parts than the neck because of similar aspects:
early 15c., "ligament in the neck," from Latin cervix "the neck, nape of the neck," from PIE *kerw-o-, from root *ker- (1) "horn; head." Applied to various neck-like structures of the body, especially that of the uterus (by 1702), where it is shortened from medical Latin cervix uteri (17c.) . Sometimes in medical writing 18c.-19c. cervix of the uterus to distinguish it from the neck sense.
(Etymonline)