This phase II trial studies Trk inhibitor LOXO-101 in treating patients with solid tumors, non-Hodgkin lymphoma, or histiocytic disorders with NTRK fusions that have spread to other places in the body and have come back or do not respond to treatment. Trk inhibitor LOXO-101 may stop the growth of cancer cells by blocking some of the enzymes needed for cell growth.