The first sentence is wrong: the past continuous suggests that the action took place for an unspecified period of time, but this action lasted for two days. So the past continuous can't be used.
The other three sentences are fine, but one expects a subordinate clause beginning with 'when' which generally would explain why the action in the first clause was terminated. For example, "Two weeks ago, I was working in my father's restaurant ... when I caught a cold", or " ... when I learnt how to cook spaghetti".
Edit: after reading again, the first sentence is technically legal (although exceedingly clunky), although again, it's missing an expected "when" clause. "Four weeks ago, I was writing a short story for two days ... when I ran out of ideas". Normally, one would write "Four weeks ago, I spent two days writing a short story when ... ".