I think what helps me get in the mood to write is sticking to a level of roleplaying that I know I can commit to. I used to be a bit of an advanced roleplayer in my earlier days (I know I can write really well) but I've come to see that I join group or 1x1's roleplays that are more laid-back (but not so laid-back that grammar, punctuation, characterization, organization, all that good stuff is almost nonexistent). I know that are roleplays in the Casual sub-forum that can almost be considered a bit of what you see in Advanced section but just think of the ones that are the lowest to mid-Casual, those are the ones I like. I join these because I know I can keep up with them since I also get distracted easily too; I want to do a lot of things at once like play video games, watch movies, or videos. I find writing to be a chore sometimes but when it's with the right partners, it's very fun. I like working with people who have the blessing of being patient and easy-going; that's what makes me commit and it motivates me a lot to do what I enjoy most. There are only so few roleplaying partners like that whether it's in groups or for 1x1's. You should aim to find that kind of person too! If you also struggle with short-attention span, break down your activities. Dedicate some time that doesn't have to do with writing/roleplaying and do the same for the latter. I know it's a bit corny but listening to calming instrumental music that used for studying, can help you keep grounded on one task; it does for me, at least, since my mind is always racing with thoughts and that helps to silence it and just be and think in the moment.