Matter will not exist for an infinite period of time ...
It may become energy. Then that energy may become mass again. Then that mass may become energy again. On and on.
The "heat death of the Universe", nor any other "death of the Universe", which would result in all motion ceasing has not been proven to be a definite event. Thus, to the best of our current scientific knowledge, all things are in perpetual motion.