The tests to determine who a dad is before the baby is born are, in order of time (when to do them):
1 - Take your calendar in of when you had sex and ask your doctor to help you understand when you conceived (when you ask, use the actual c-word "conceived," don't just take a number of weeks "along" as an answer to this question). Explain when you had sex with whom, and see if the doctor can advise you as to who is the dad by the dates of the sex. This is the cheapest and easiest way to get an answer. If the dates are too close to call, the doctor will say so.
2 - Get an early ultrasound, for example around your seventh week from the first day of your last period, and have the doctor give you an estimated due date from the measurements of the embryo without the first day of your last period influencing the assessment. Then take that due date home and either count back 266 days from it on a calendar, or put it into an online conception calculator, to get your estimated date of conception.
3 - Get a prenatal DNA test. Don't use one of the cheapie so-called labs, either use Ravgen or the DDC. They are costly, so only go this route if:
- your dates are too close for the doctor to be able to advise you,
- you have the big chunk of change that they cost, and
- you are willing to test with both potential fathers. (One man's positive result will back up the other man's negative result, serving to provide you peace of mind.)
Neither Ravgen nor the DDC's tests are invasive nor harm the baby; there is a blood draw from the mother (her arm) and cheek swabs from the potential fathers. There are many charlatans in this field, so stick with one of those two labs. We see them mentioned favorably often on this site and the only times they have been bad-mouthed, it seemed to have come from a troll.
4 - After the baby is born, get a DNA test for paternity with both fathers. (It is much cheaper once the baby is born than the prenatal tests are.) Use a legitimate lab recommended by the family courts in your area of jurisdiction.
If either of the possible fathers will not willingly test before the baby comes, you will need legal counsel to enforce a test after the baby comes. Don't test with one guy and just assume the other guy is the dad if the first one got a negative result. You need to be sure from a certified lab where people go with I.D. and are photographed, that you have a legitimate result.
From your other posts, it sounds like you might not need to go so far as a prenatal test, since it sounds like you thought your weeks GA is a time period that began with conception. But if you do know that isn't correct, and your question takes it into account, the next thing to do is talk it over with your doctor.