How can I train myself to fall asleep at a certain time?

Routine. You need to keep to a regular schedule. Waking and going to bed at the same time every day will condition your brain to expect sleep at that time. It is also important to keep to that schedule every day, so that you do not break the cycle on weekends.