Yes, you can do Gosainkunda Trek with Langtang Valley Trek if you have around 17 days time to spend in Nepal. You have choice to do Gosainkunda Trek fist and then, Langtang Valley Trek or first, Langtang Trek, Gosainkunda Trek with Helmabu Circuit Trek.
While doing Langtang Gosainkunda Trek, you need 8 more days and the route diverts from Lama Hotel towards Thulo Syabru instead of Syabru Besi. After exploring Gosainkunda Lake, you can trek back to Syabru Besi to return to Kathmandu. Alternatively, you can trek to Ghopte, then Melamchi Gaon, Tarkegyang, Sermathang, Melamchi Bazaar, and drive to Kathmandu.