It can also be done without using PIVOT
Create Table #Sample(EmpName varchar(20), EmpTraining varchar(20), AssignmentDate Date, CompletedDate Date);
Insert #Sample(EmpName, EmpTraining, AssignmentDate, CompletedDate) Values
('Emp1', 'Training1', '2020-10-01', '2020-10-21'),
('Emp1', 'Training1', '2019-10-01', '2019-10-15');
Select EmpName, EmpTraining,
Min(Case When DateDiff(year, AssignmentDate, GetDate()) = 0 Then AssignmentDate End) As CYAssgnDate,
Min(Case When DateDiff(year, CompletedDate, GetDate()) = 0 Then CompletedDate End) As CYCompDate,
Min(Case When DateDiff(year, AssignmentDate, GetDate()) = 1 Then AssignmentDate End) As LYAssgnDate,
Min(Case When DateDiff(year, CompletedDate, GetDate()) = 1 Then CompletedDate End) As LYCompDate
From #Sample
Group By EmpName, EmpTraining;
Tom