If a town name in a popular fictional work is widely associated with a particular fictional work, can the name be freely used as a name for a new nonprofit organization even if the nonprofit is mundane and completely unassociated with the fictional work even by any remote stretch of the imagination, other than for the ease with which members and affiliates can remember the name?
Names are not copyrighted. However, some can be trademarked.
To clarify what that means:
a copyright fully protects an entire work of authorship, i.e. a book, movie or work of art.
a trademark represents a specific part of your brand or product, and is usually used for names, slogans or logos. (Source)
So you cannot legally "copyright" a name, but you could definitely trademark one, and many authors do.
For example, the character of Harry Potter is legally trademarked by Time Warner Entertainment, so that no other works of published literature can use the name Harry Potter or the character associated with it. Nor can you use Draco Malfoy, or a few others.
Can I use a trademarked name in my book?
By law, you do not need to request permission to use a trademark belonging to another if it is for an editorial or informational use. However, a commercial work of literature is not an informational use, and therefore is not specifically protected. (Source)
You may use a trademarked name in your book if it has not been specifically trademarked against being used in other works of literature. If it has, you cannot use it.
You can use this website to look up whether the name you are trying to use is protected by a trademark. If it is, it may not be strictly illegal to use, but you should avoid it for the sake of avoiding legal trouble.
Relevant Writing SE question: Are Names of Characters Copyrighted by Authors?