You don’t choose a target for Selfcraft Mechan’s ability at the time it triggers. Rather, a second “reflexive” ability triggers when you sacrifice an artifact this way. You choose a target for that ability as it goes on the stack. Each player may respond to this triggered ability as normal. Then if the target creature is an illegal target as the reflexive trigger tries to resolve, it won’t resolve and you won’t draw a card.