The problem when you wait a very long time for something you so desperately want is that you have a lot of time to visualise what you dream of, even if during that time, you knew that this could be damaging. It's a way of staying positive and strong whilst coping with the wait and uncertainty.
Once you start to visualise something, it can start to become very real, and because that visualisation makes you feel good, the idea that in the end, it doesn't become your reality can be frightening.
Like you, I desperately hope to be pregnant with a girl when I was first pregnant. That's because as long as a I can recall, I long for the day I would be a mum and always imagined myself with a blond and blue eye little girl. I couldn't wait for the scan to confirm it, yet despite 3 scans, they couldn't tell (legs crossed). In the end, I did have my blue eye blond hair girl (even though neither I nor her dad is blond). She was exactly the girl I imagined, in many ways, it was actually quite spooky.
When I fell pregnant the second time, I again wanted a girl because again, it would have fulfilled my imagination of my so adored girl having a sister she could be closed to. Yet from the moment I was pregnant, I was convinced it was a boy. I was very much anticipating asking at the 20w scan. What took me as a total surprise was when the sonographer announced it was a girl and I found myself hugely disappointed and so surprised that I did ask him at the end if he could have a look again, which to his great annoyance he agreed... and sure enough, it was then very clear it was a boy.
My kids are now 18 and 15 and yes, my boy is much much harder to bring up, but when it comes to love, I feel exactly the same for both, although in a different way as I feel much more protective of my boy than my daughter.
As Bridgeteilly has advised, it is possible to change your mindset, break that image of perfection you've build in your mind to get to the point of identifying your happiness with what you actually have rather than what you are imagining you will have. Be totally assured that whether a girl or a boy, your experience of becoming a mum will come with utter joy and happiness, and most likely times of frustration, desperation and confusion whatever the sex of your baby.
And like others, I really wouldn't take this stupid test seriously. How would have felt if it came back 97% girl and it turned out to be wrong? I could have gone 5 months certain I was expecting another girl to have the surprise of a boy at birth. You really don't know until they are in your arms.