Yes exactly, it's hard to start a new habit on very familiar places for us
So I suggest going out to somewhere you can code peacefully without distractions.
When I started, I used to go to the university library since I'm surrounded with people studying so i would feel guilty to slack off.
If going out is not an option, try to establish an environment in your place that's significantly different than your daily routines.
For me it's a matter of place. For others it could be a matter of time. Try to set aside 15-30min per day for it. And make sure you don't miss it for next 2 weeks. I read somewhere that it takes a certain amount of time to build a habit, 2 weeks of 15min a day sounds like a good start. Since it's little but it's consistent.
Also look for meetups in your area for coding sessions
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.