No, your data will not be lost while upgrading from version 3.x.x to 4.x because we are not updating the WordPress or database. The courses, units and other data on your site is saved in database and this update will not affect anything But still, if you are afraid, you can keep a backup of your site and then proceed