I (the DM) had this thought that the familiar who belongs to an evil wizard far away from the players was delivering a message to the Bugbear leader of a band of goblins who was under the command of said wizard to search an ancient crypt. Can a familiar be given a command to travel that distance and deliver a message? The only thing I can find regarding range in the PHB is 100 feet for telepathic communication and 1 mile for empathetic communication.
Yes. The familiar can travel any distance from the caster.
The rules only limit telepathic communication and seeing through the familiars eyes, not travel. The spell find familiar only limits the range of communication, the range you can see/hear through your familiar and the range at which you can cast through your familiar.
While your familiar is within 100 feet of you, you can communicate with it telepathically. Additionally, as an action, you can see through your familiar's eyes and hear what it hears until the start of your next turn, gaining the benefits of any special senses that the familiar has. During this time, you are deaf and blind with regard to your own senses.
Finally, when you cast a spell with a range of touch, your familiar can deliver the spell as if it had cast the spell. Your familiar must be within 100 feet of you, and it must use its reaction to deliver the spell when you cast it. If the spell requires an attack roll, you use your attack modifier for the roll.
Those limits on communication are greatly expanded for Warlocks with the Pact of Chain boon and the Voice of the Chain Master -- where the familiar can be communicated with, and see through senses used, anywhere on the same plane of existence. The invocation doesn't mention travel distance:
You can communicate telepathically with your familiar and perceive through your familiar’s senses as long as you are on the same plane of existence. Additionally, while perceiving through your familiar’s senses, you can also speak through your familiar in your own voice, even if your familiar is normally incapable of speech.
Rules as Intended
Someone asked this to Mike Mearls, one of the designers of D&D 5e, and he confirmed that is what the designers intended the rule apply: Does a familiar have a max distance it can be from it's master?
Does a familiar (Find Familiar spell) has a max distance it can be from its master? Is 100ft dist. for telepathy only? Thanks!
Nothing inherently prevents a familiar from traveling long distances
When you summon a familiar, it gains the statistics of the chosen beast, with the exception of its creature type (emphasis added):
You gain the service of a familiar, a spirit that takes an animal form you choose [...] Appearing in an unoccupied space within range, the familiar has the statistics of the chosen form, though it is a celestial, fey, or fiend (your choice) instead of a beast.
This means that your familiar can in theory do anything that the chosen form is physically capable of. (The change in creature type has no bearing on the familiar's physical traits or abilities; see this answer.) If an ordinary owl could deliver a letter to a recipient 100 miles away, then so can your owl familiar. If an ordinary owl would be unable to fly over a high mountain range or across an ocean to deliver your letter, then your owl familiar can't deliver the letter either. For DMs determining how long it will take a familiar to reach its destination, I would recommend using the travel paces set out in the Animal Messenger spell for the sake of simplicity.
Additionally (emphasis added):
Your familiar acts independently of you, but it always obeys your commands. In combat, it rolls its own initiative and acts on its own turn. A familiar can't attack, but it can take other actions as normal.
Your familiar can take any action its form is capable of taking other than attacking, and it acts independently of you. This means that nothing requires the familiar to stay within a certain distance of you. It is capable of acting independently and taking whatever actions it needs to take to survive along a potentially extended trip away from you.
One possible issue arises with forms that are obligate carnivores, such as a hawk or owl. Strictly applying RAW, a carnivorous familiar would be unable to hunt for its own food, since it cannot attack. As DM, you could rule that hunting small rodents for food is distinct from attacking in combat and decide that any familiar is nonetheless capable of acquiring the kinds of food that make up its normal diet. If not, then you may need to apply the rules for starvation to determine the maximum distance a carnivorous familiar can deliver a message without any food to eat.
You need to give your familiar a command it can understand
So, let's assume your familiar is physically capable of delivering the message. That is, there are no impassible mountains, un-crossable bodies of water, etc. blocking it, and it will be able to satisfy its dietary needs en route. You still need to give your familiar orders it is capable of carrying out. This is greatly aided by the fact that you can deliver your orders telepathically, but a familiar is still limited by its Intelligence score, which can be at most 3 (not counting additional forms granted by sources other than the spell's text). So you probably can't tell your familiar something like "go find Joe and give him this letter." Your familiar probably doesn't know who "Joe" is, and even if it did, it doesn't know where to find him. However, if you tell your familiar to "fly north along the river to the town and deliver this letter to the largest building there, then return by the same route," that's probably something it can handle. It's not too many steps, and each step is something a beast could understand and do. Obviously, in this case you would need to trust that anyone in the specified building to deliver the letter to the intended recipient.
Taking the example given in the question, the goal is to have the familiar deliver a letter to "the Bugbear leader of a band of goblins". The most reliable order would probably be to fly to an easily visible landmark and then deliver the letter to the first goblin it sees (who should presumably deliver the letter to their bugbear leader).
As far as I know, the rules don't provide specific guidance on what a creature given Intelligence score is capable of understanding. Thus adjudicating whether a given order is too complex for the familiar is going to require the DM to make a ruling. However, as one reference point, an Intelligence score of 4 appears to be used consistently as the threshold of sentience, for example by Detect Thoughts, which does not work on targets with an Intelligence score of 3 or less.
A familiar can be intercepted
If you send a familiar on a letter-delivering journey, you also have no guarantee that it will make it there alive. Even a flying familiar needs to stop for rests, and anywhere the familiar is capable of surviving, other beasts will also be present, and they will be hungry (and they don't know that the familiar will poof into poof into nonexistence rather than provide a tasty meal when killed). In addition, if your enemy knows you are using a familiar to communicate, they could position archers to shoot it down. In short, just like any journey the PCs might make, a familiar's journey entails some danger. And unlike the PCs, the familiar has no way to defend itself, and with no more than 3 hit points it generally can't survive even a single hit. So you should not rely on this form of communication for conveying critical information.
(Arguably, this last point applies to any message sent using Animal Messenger as well.)
A familiar can travel as far as any other animal of its type, irrespective of its distance from its master.
When considering the rules, restrictions, and abilities of a familiar, we should start with the base animal and then apply the rules for familiars. There is nothing in the rules for familiars that restrict how far a familiar can move from its master, therefore its movement is no more restricted than a standard animal of its type. (Ex: Use rules for overland travel, etc.)
The familiar can exist without being near their caster
Nothing in the rules states of a distance limitation for the familiar to keep existing, so it makes sense that it isn't limited in that regards.
As a quick note supporting this, the text of Find Familiar states the following :
As an action, you can temporarily dismiss the familiar to a pocket dimension.
Since extradimensional spaces and planes are an infinite distance apart from each others, it would mean that if your familiar was sent in its pocket dimension, it would get out of whatever range it could be limited to. If that was the case, it wouldn't make sense to have that ability in the first place.
About your specific issue
This answer mentions that the spell Animal Messenger does exactly what you're looking for (especially if you're looking for a solution for your NPC, which removes the issue of balancing it for PCs).
As to whether it would be balanced for PCs, it is the exact topic of this same question. Instead of splitting the same answer between this question and the linked question, I recommend checking out the linked question and its answers, especially since the answer isn't clearly cut (as of writting this answer).
Because of the lack of concrete rule in the RAW, much of this could come down to the DM's interpretation. (Like so many things in D&D!)
There's a tweet from Jeremy Crawfod which whilst not being an official ruling at least guides us towards the suggestion that the writers intention was for familiars to be able to be sent off over longer distances having been given an instruction, but obviously doesn't necessarily tell us the distance, nor the instruction.
It is however, a 1st level spell, and it summons a familiar which, although it can be Fey, fiend or celestial, otherwise mimics the stat block of a challenge rating 0 creature:
You gain the service of a familiar, a spirit that takes an animal form you choose: bat, cat, crab, frog (toad), hawk, lizard, octopus, owl, poisonous snake, fish (quipper), rat, raven, sea horse, spider, or weasel. Appearing in an unoccupied space within range, the familiar has the statistics of the chosen form, though it is a celestial, fey, or fiend (your choice) instead of a beast.
That means that your familiar, whatever form it takes, has 1 hp, and an intelligence of 2, so it's reasonable to question whether it has the capacity to understand a task as complex as "Take this message to this person"
Similarly, if they can, this would effectively replicate a version of higher level spells at a lower level, although with some limitations, such as needing to write the message out, and attach it to the familiar.
Animal Messenger is a second level spell, and would achieve the same ends although with a word count limitation, and of course does have the class limitations of being bard, druid or ranger, whereas find familiar is a wizard spell, so although it's a replicate, it's not necessarily something one PC or NPC could do without multiclassing.
The wizard will however, at higher levels, have access to Tiny Servant - assuming you're using spells available in Xanathar's Guide - which would definitely allow you to to send a message, with the limitation that the travel time/speed is how far the creature can get in under 8 hours. Assuming the tiny servant has to walk, it's got a movement speed of 30ft, which gives you an effective range in 8 hours of 24 miles.
From the DM's guide/courtesy of Groody the Hobgoblin
"In 1 hour, you can move a number of miles equal to your speed divided by 10. For daily travel, multiply your hourly rate of travel by the number of hours traveled (typically 8 hours)." So 30 feet speed would be 24 miles in a normal day (plus one third if traveling fast pace).
As the RAW don't actually give a properly concrete rule on this, I'd be inclined to say that if you wanted to try it, I'd roll a random luck check to see if it was possible, especially if the messenger is a prey animal or travelling through difficult terrain for its species, and that the stipulations would need to be the same as for animal messenger at the very least. Somewhere you've been before, someone you've met before, a description rather than a name, and a short message; unless the familiar is close enough for telepathic communication.