The Schrödinger equation is solved for an A-nucleon system using an expansion of the wave function in nonsymmetrized hyperspherical harmonics. Our approach is based on the formalism developed by Gattobigio et al. (Phys Rev A 79:032513, 2009; Few-Body Syst 45:127, 2009; Phys Rev C 83:024001, 2011), where it was applied to four- and six-body systems using central and central spin dependent potentials. In addition we include isospin dependence and noncentral forces in order to be able to make calculations also with more realistic NN potential models. Furthermore, a more efficient procedure to determine the fermionic spectrum is used. The approach is applied to four- and six-body nuclei (4He,6Li) with various NN potential models including for 4He the realistic AV18 potential. It is shown that the results for ground-state energy and radius agree well with those from the literature.