How to convert a variable to be used in where clause
Since the data type of the job_id in the msdb.dbo.sysjob table is uniqueidentifier.

So you need to create the @job_id_char as a uniqueidentifier variable, like
DECLARE @job_id_char uniqueidentifier
then only it can be used in the WHERE clause of msdb.dbo.sysjobactivity table.

Or you can JOIN the tables by the the job_id like 

SELECT sja.start_execution_date, .....
FROM msdb.dbo.sysjobs sj
JOIN msdb.dbo.sysjobactivity sja ON sj.job_id = sja.job_id
WHERE ..... -- condition related sysjobs tables