If its in diamond, you were going the wrong way, you need to find another cavern (with a lot of team galatic members) and in the end of that you will find a temple (spear pillar) and you need to fight Jupiter and Mars (with the help of your rival ) and in the end he will cure you Pokemons and then you`ll fight the boss, Cyrous (it's a hard battle-BE READY) and finaly you will be able to get Dialga, but you can't get out of there without defeat him out catching him.
If you need more help, put this on youtube:Pokemon Diamond / Pearl Walkthrough 73, see also 74 and 75