Cosmological solution with matter in a new theory of gravitation