I automatically thought it was a female based on the name.
この場合、次のような言い方ができますよ。
ーI assumed he was a woman by the name.
「名前から女性かと思い込んでいた」
to assume「思いこむ・決めてかかる」
ーI automatically thought it was a female based on the name.
「名前をもとに、女性だと無意識に思った」
automatically「無意識に」
ご参考まで!