After going to the gym for workout after work, I have trouble sleeping early. What should I do?

Consider AM workout. Unfortunately, a workout at night is alerting to the brain and will make falling asleep more difficult. If you could change your workout time to the morning that would be better. Otherwise stay up later until you feel sleepy before going to bed and make sure lights are dim for 1-2 hours before bedtime.
Insomnia and the gym. What you are describing is what is expected to occur when one exercises to close to bedtime. In sleep medicine, we always recommend the avoidance of exercise within 4 hours of bedtime as the onset of sleep occurs as the core body temperature drops and if anything raises your core body temp, ie, working out, then the mind will have a difficult time falling asleep.