They all refer to the total energy consumption of a country. The gross domestic consumption is the terminology used by Eurostat: it includes non-energy uses and international air transport. Primary energy consumption is defined by the Energy Efficiency Directive as the gross domestic consumption without non energy uses. TPES is used by IEA: it includes non-energy uses and excludes international air transport.
Related question