How to get a list contacts that have not donated within a certain amount of time?
I would use the CiviRules extension to achieve this. With this extension you can check if contacts in a certain group have not donated for a period of time for example.

You can find the extension here: https://civicrm.org/extensions/civirules (or in your extension list)

Documentation on using this extension can be found here:https://docs.civicrm.org/civirules/en/latest/