Spectral features of Earth-like planets and their detectability at different orbital distances around F, G, and K-type stars