They both have two different meanings, you shouldn't be getting confused about it.
Use "as long as", when something lasts or when somethings keeps being there or existing, literally a thing that'll be there for a "long" time.
example: I'll love you as long as you behave well. (In this sentence, the love will exist if the act of behaving well would "last" and keep existing.)
Use "as far as", when you describe something being insight, far or ahead of you, literally "far", that thing doesn't have to be material that can be touched, it can be a feeling or anything.
example: As far as I can see, there's nobody. (In this sentence, there's something far away from you, which is people, you can't find anybody. You can't say here "As long as I can see, there's nobody.")
"As long as I can see, there's nobody." is meanginless, because it literally means "I can see, I have eyes, and anytime I would see/look or use these eyes, there's nobody."