Is trowing penalized when someone is in melee range of you like archery ?
Yes, if you are engaged then you get disadvantage on throwing just as if you were using a bow (Or non-touch range spell)
Of course, as a Throwing build prioritizes Strength, you are very much capable of Shoving an enemy that is engaged with you away allowing you to then throw without disadvantage.
Not to mention... You can still actually melee with a throwing build. Like, you are very much able to throw at the start of the fight, then when enemies start to get close run in to melee and start meleeing and absorbing damage. You're not necessarily bad at melee, it's just it won't be anywhere near as strong as your thrown attacks (Which are ridiculously strong thanks to Tavern Brawler feat)