In short, A heterostructure specifically refers to the arrangement of different semiconductor materials, while a nanocomposite is a broader term encompassing materials with diverse nanoscale components embedded in a matrix material.
Chapter 1 - Heterostructure and Quantum Well Physics
Publisher Summary
Heterostructures are the building blocks of the most advanced semiconductor devices being developed and produced. They are essential elements of the highest-performance optical sources and detectors, and are being employed in high-speed and high-frequency digital and analog devices. The use of heterostructures is that they offer precise control over the states and motions of charge carriers in semiconductors. A heterostructure is defined as a semiconductor structure in which the chemical composition changes with position. The simplest heterostructure consists of a single heterojunction, which is an interface within a semiconductor crystal across which the chemical composition changes. Most devices and experimental samples contain more than one heterojunction. Closely matching the lattice constants of the participating semiconductors—good lattice matching—is a necessary condition for the fabrication of high-quality heterojunctions. Heterostructures are fabricated by an epitaxial growth process. Most of the established epitaxial techniques have been applied to the growth of heterostructures. These include molecular beam epitaxy (MBE) and metalorganic chemical vapor deposition (MOCVD). Liquid phase epitaxy (LPE) is an older heterostructure technology, which has been supplanted by MBE and MOCVD because it does not permit as precise control of the fabricated structure.
https://en.wikipedia.org/wiki/Nanocomposite
Nanocomposite is a multiphase solid material where one of the phases has one, two or three dimensions of less than 100 nanometers (nm) or structures having nano-scale repeat distances between the different phases that make up the material.[1][2]
Nanocomposites, Nanostructures and Heterostructures of Correlated Oxide Systems- ISBN: 9781605114316
Heterostructured materials- Progress in Materials Science
I would look wider at a heterostructure definition. While, indeed, it can be defined as it was said here, if we look at the heterostructure as a variable combination of different (hetero - "different" or "other") materials of variouse structure/quality, we can see that any materials containing separated phases of different components may be considered as a heterostructure. In fact, you can find that the term "heterostructure" is appliedin in different fields, e.g. look at the paper by Novoselov et al. in Science, 2016 (10.1126/science.aac9439). Therefore, the term "nanocomposite" is narrower than a heterostructure i.e it can be considered as a heterostructure too.