Dynare help

There is either a timing problem or a problem with the setup. Something that might be relevant is the sectoral structure. See [Timing of capital in two sector economy)
In general, you might want to start with a simpler version of the model that works and then start adding features.