Salamun Alaikum,
You are correct, the word 'Yateem' in 4:3 is not gender specific. However 4:127 has an important phrase ''...God gives you ruling about them (fihinna) and what is recited to you in the Book..."
Now it is clear given the word 'fihinna' (which can only be a reference to women) that a ruling was specifically asked concerning women. This is supported by the term "yatama-nisa" which means orphan woman. First, it is clear that only 'women' can be married and not 'girls'. This puts an end to child marriages.
Verse 4:127 is talking about a few matters:
(i) Regarding orphan women (yatama-nisa) and giving of the correct portions. The verse clearly talks about the desire to marry them yet not giving them proper portions (In a way to compromise them or take advantage of them). This could be a clarification to verse 4:4 where all women should be given proper dower (orphan women and free believing women). However, this does not exclude orphan women which are also included in the Arabic of 4:3 which have the potential of being compromised. An orphan (yatama - generic) can also be a woman and not just a girl or boy. So both 4:3 and 4:4 are covered in the clarification of 4:127.
(ii) 'wa' (and) those weak / vulnerable / oppressed children (mus'tadafina wildani) who have the potential of being compromised (their proper due not given to them). This could be a clarification to verse 4:5-6 where guidance is clearly given so that the 'sufahaa' (unwise, foolish, ignorant or those of limited understanding) be appropriately protected.
(iii) 'wa' (and) orphans are not compromised and justice (qist) is done to them. This can easily be related to verse 4:3, 4:5 and 4:6. regarding vulnerable orphans.
Many simply relate 4:127 with 4:3. But this, in my humble view is an unwarranted restriction of interpretation. As you can see in the above clarification (i, ii, & iii), the above can be split up into at least three areas.
So in summary, verse 4:127 is clearly instructing believers not to take advantage of male / female orphans or orphan women (in marriage), to give them their proper due (This could be marriage gifts / inheritance etc). An important portion of the surah deals with justice, proper proportions, inheritance etc.
None of these verses are saying you can ONLY marry in these circumstances. This is akin to introducing something into the Quran, that God has not said. The verses are dealing with justice and not marriage allowance.
We cannot introduce our world views into the text otherwise we risk making our desires into God. This is akin to idol worship as you will agree.
025.043
"Have you seen him who takes his desires (passion, impulse, lust) (Arabic: Hawahu) for his God (Arabic: Illahahu)? Will you then be a protector over him?"
I hope this helps, God willing,
Joseph