If it seems that you can't get some task done and you aren't making any progress this means that either (a) it lies beyond your present abilities, and/or (b) your heart isn't in it.
>I can work for 10 straight hours if I'm at school
This is part of the problem IMO. Schools are inherently coercive and this messes up one's approach to instrinsically motivated learning.
It is the task itself that provides the reward. If the work is noble and interesting and if it lies within your abilities then you will find sufficient vitality is available to perform it.
OTOH, forcing yourself to do stuff (as if you were still at school) causes the mind to slowly shut down (starting with loss of creativity).
>I find it very hard to work at least 1h
If you weren't doing the 'work', what would you be doing instead during that hour? Start with that, and do it better.