NIPT (non-invasive prenatal testing) is fully permissible, since it poses no risk to mother or fetus, and can provide valuable medical information about the health of the fetus. As with any test, it is wise to discuss with your physician the meaning and implications of possible results before doing the test.
Finding out the baby’s gender in advance is halachically permissible and is a personal choice
B’sha’ah tovah!