In the context of your build, this is balanced
Essentially, You have opted to deprive yourself of one of the most powerful tools that come with playing a warlock, Eldritch Blast, for the sake of flavor and using weapons.
So, one way to think about it is as if this Invocation had an additional paragraph:
While you know this invocation, you cannot cast Eldritch Blast.
That downside seems more than enough to balance any potential upside imbalances this may have.
Bonus Action. The change from action to bonus action is material, but without it this would be mostly useless. It also competes with many other bonus actions warlocks have from casting hex to curses. There may be a bit of extra pickup here for getting back dropped weapons etc, but I think that is fine.
Thrown melee weapon: This adds potentially 3.5 damage to the ranged attack (as you could throw a 2d6 melee weapon, instead of the typical 1d6 or worse thrown weapons). That still does not seem to compete with the expected damage output of an Invocation bolstered Eldritch Blast. Unless you have a lot of other effects you can pile on, or a unusually powerful magic weapon to combine with it, this appears just to allow you to realize your character concept and live out your fantasy, not a way to try and gain an unfair advantage (see further down for details).
I would as a DM not have any problem with allowing you to use this in my game.
Quantitative Comparison vs EB
Without that choice of yours to forgo EB, one would need to benchmark the power of this more closely. I think it’s likely still OK, just because it is still competing with Eldritch Blast. But on a flametongue or vorpal blade, this may become more interesting:
Eldritch Blast:
Here is a typcial damage progression for EB, including taking one Invocation (Agonizing Blast) to boost it, and maxing Charisma along the way:
You deal 1d10+3 (8.5) originally, 2d10+8 (19) on level five, or 3d10+15 (31.5) on level 11 out to a range of 120 feet.
Blade Works and a weapon:
If your Patron is the Hexblade, with a longsword as your weapon (to have a fair comparison for only needing one hand like EB), you deal 1d8+3 (7.5) originally, and this does not naturally scale. If you have a magic weapon, for a simple +1 you'd one extra point of damage (and another about half a point from higher to hit). This is comparable. A flame tongue would add +2d6 instead for a total of 14.5, but is not a weapon you'd expect to own at that level.
On level 5, with Thirsting Blade you could get two attacks on the Attack action from level 5 for a total of 2d8+8 (17) or (19) with a +1 weapon, which would scale with EB, but it would cost you an extra Invocation, and since you only have one bonus action you could get the weapon back only once, which dampens the usefulness from throwing it.
On level 11, you have no direct way of scaling, so you would need a better magic weapon. With a flame tongue and Thirsting Blade, you would look at 2d8+4d6+10 (33) damage, slightly ahead of EB, but again, you cannot retrieve your weapon two times per turn. You also could take the lifedrinker invocation on level 12 to bump the raw damage by 10 necrotic for 29 total instead (31 with a +1), which can compete with EB but needs yet another Invocation. Hex also applies to each attack, and would boost EB with its three attacks more than using a weapon with Thirsting Blade.
Overall, even with a magic weapon, this will not deal more than EB, and it has a shorter range. If anything would be slightly underpowered in comparison.
P.S. As a side note, Eldritch Knight has this ability to retrieve their weapon "out of the box", so it might be worth consideration for building a character that wants to throw and retrieve their weaopon, instead of homebrewing a warlock variant.