I have many menstrual pain and the doctor referred me to a gynecology they want to do a internal echo because they think that i have a sickness and they can see it only with that echo. Im a virgin and not married and my question is if i can do the internal echo or not. Is that haram ?

According to what you have mentioned, if there is a necessity to be examined by a gynecologist, it is permissible to get the test done.
As long as you have asked for a 2nd opinion from specialists than you are allowed to go for the test for further investigation.