Salut Kenc37 !
Merci pour votre question ! The ce vs. il/elle matter is quite a complicated one, and can throw a lot of French learners for a loop. This is because while people have tried to set out a number of rules to govern their use - for example, in front of an unmodified noun or adverb, you should use il/elle; in front of a modified noun or adverb, you should use ce - these rules don't always hold up perfectly. For instance, there are some sentences where you could use either il/elle or ce; using the former would make it sound as though you're referring to something specific, while the latter would make it sound as though you're referring more to something more general.
While it seems quite complicated now, you will end up learning whether to use il/elle or ce over time as you become exposed to more and more French sentences. You will start to develop a feel for what sounds right and what doesn't. In general, though, you don't have to be too worried: people will still be able to understand what you're talking about if you use one or the other in an unusual place.
For now, though, let's take a look at the two sentences you've identified. They do each deal with adverbs, as you guessed: là-bas and loin. (If you're ever unsure about what part of speech to classify a word as, you can always take a look in a dictionary, like the one from Larousse (https://www.larousse.fr/dictionnaires/francais).)
In the first sentence you've asked about, Elle est là-bas, là-bas is an unmodified adverb - that means that no additional word has been added to it. Here, the rules apply quite neatly: since il/elle is usually used in front of unmodified adverbs, elle is used rather than ce. The impression given by this sentence is very concrete: elle "it," being la poste, is over there.
The sentence Ce n'est pas loin is a bit trickier. The adverb loin is also not modified in this sentence, so according to the general rules you would use il/elle; however, c'est loin and ce n'est pas loin are very commonly used phrases. I would say that ce here is being just a bit more abstract: it's more like saying "that thing that you're asking about" rather than referring to a specific location.
I hope that this is helpful! Again, this is quite a difficult area to puzzle out at the beginning, but sentences will start to sound more natural to you one way or the other over time!
Bon courage !