You said, "In my 3rd week I had pains in my shoulder and hip...". What kind of pains? How old are you? There are pains, and then there are bad pains. Maybe you just need to learn how to distinguish them. I don't know of an exact formula, but anything that goes away in a day is probably not a bad pain. Training is painful. Expect to suffer. But don't push through bad pain -- it will just make it take longer to heal.
My example of bad pain was ITBS. It didn't hurt as much as some other pains I've felt while training, but because it didn't go away and got progressively worse during my training session, I checked out the symptoms online and confirmed that it was ITBS. My example of plain-old pain, was this weekend I went for an almost-40-mile ride. About 10 miles into it, I had some intense knee and hip pain on the left side. I noticed it, cursed at it a few times, and kept going. By mile 30, it was gone.
One of the most important things with training for this sport is consistency. My recent training history is an example of what not to do. You'd be surprised how much progress can be erased with one month of slacked-off training. Pain is not a reason to stop. It's a reason to become more aware of your body, do a little research on the symptoms, scale back a little bit or modify your technique, but not stop altogether.
Starting now, I'm sure you can get to an Olympic next year. Depending on your dedication, discipline, and amount of free time, you should also be able to do a HIM. Following a pre-made plan is a great idea. Getting a coach is even better.
As for base building, get a heart rate monitor, estimate your training zones, and start building your training distances/times following the 10% rule and staying in a low zone
(I think it's zone 2 or lower that's recommended
). Over time, you'll see that you can go faster and longer without your heart rate going through the roof or getting sore muscles.
Mike