“Able to be indistinguishable” is highly debatable here*, it's not actually science fiction† and the word “robot” does not turn up in this text‡. But if we allow this work at all, then it may well be the earliest appearance: Oʟɪᴍᴘɪᴀ from E.T.A. Hoffmann's 1816 short story Der Sandmann.
*The protagonist is in fact unable to distinguish her from a human, but it's pretty clear that his senses aren't quite alright. At least the adaption Oʟʏᴍᴘɪᴀ in Jacques Offenbach's Les contes d'Hoffmann is more of a creepy if beautiful puppet (including a crank mechanism that needs to be regularly used to re-power her mechanical clockwork), that only a drugged madman could possibly mistake for a human.
†I would perhaps call it steampunk fantasy today.
‡She's called an Automat.