Use earplugs. It helps a lot. Unless it is at night and/or you live in a quiet place and you are alone, there are always some distracting noises coming from people, nature, machines, etc. Earplugs can be a bit uncomfortable so do not use them for very long periods at a time (e.g. take a break after an hour).